]> git.sesse.net Git - movit/commitdiff
Use double right angle brackets for nested templates everywhere, now that we have...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 15 Nov 2017 19:46:16 +0000 (20:46 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 15 Nov 2017 19:46:16 +0000 (20:46 +0100)
effect.h
effect_chain.cpp
effect_chain.h
resource_pool.cpp
resource_pool.h

index 073780f172bdbc929db64238c1705221264691c4..afac5dc91c840ad6f273786498c1233547927343 100644 (file)
--- a/effect.h
+++ b/effect.h
@@ -403,19 +403,19 @@ private:
        std::map<std::string, float *> params_vec4;
 
        // Picked out by EffectChain during finalization.
        std::map<std::string, float *> params_vec4;
 
        // Picked out by EffectChain during finalization.
-       std::vector<Uniform<int> > uniforms_image2d;
-       std::vector<Uniform<int> > uniforms_sampler2d;
-       std::vector<Uniform<bool> > uniforms_bool;
-       std::vector<Uniform<int> > uniforms_int;
-       std::vector<Uniform<float> > uniforms_float;
-       std::vector<Uniform<float> > uniforms_vec2;
-       std::vector<Uniform<float> > uniforms_vec3;
-       std::vector<Uniform<float> > uniforms_vec4;
-       std::vector<Uniform<float> > uniforms_float_array;
-       std::vector<Uniform<float> > uniforms_vec2_array;
-       std::vector<Uniform<float> > uniforms_vec3_array;
-       std::vector<Uniform<float> > uniforms_vec4_array;
-       std::vector<Uniform<Eigen::Matrix3d> > uniforms_mat3;
+       std::vector<Uniform<int>> uniforms_image2d;
+       std::vector<Uniform<int>> uniforms_sampler2d;
+       std::vector<Uniform<bool>> uniforms_bool;
+       std::vector<Uniform<int>> uniforms_int;
+       std::vector<Uniform<float>> uniforms_float;
+       std::vector<Uniform<float>> uniforms_vec2;
+       std::vector<Uniform<float>> uniforms_vec3;
+       std::vector<Uniform<float>> uniforms_vec4;
+       std::vector<Uniform<float>> uniforms_float_array;
+       std::vector<Uniform<float>> uniforms_vec2_array;
+       std::vector<Uniform<float>> uniforms_vec3_array;
+       std::vector<Uniform<float>> uniforms_vec4_array;
+       std::vector<Uniform<Eigen::Matrix3d>> uniforms_mat3;
        friend class EffectChain;
 };
 
        friend class EffectChain;
 };
 
index 0c46768fd5d7db4470430556ee9b3ea7342b4b3c..ecf4208f7dc5cfd12adebbdb9f38f120ec47924d 100644 (file)
@@ -311,10 +311,10 @@ string replace_prefix(const string &text, const string &prefix)
 namespace {
 
 template<class T>
 namespace {
 
 template<class T>
-void extract_uniform_declarations(const vector<Uniform<T> > &effect_uniforms,
+void extract_uniform_declarations(const vector<Uniform<T>> &effect_uniforms,
                                   const string &type_specifier,
                                   const string &effect_id,
                                   const string &type_specifier,
                                   const string &effect_id,
-                                  vector<Uniform<T> > *phase_uniforms,
+                                  vector<Uniform<T>> *phase_uniforms,
                                   string *glsl_string)
 {
        for (unsigned i = 0; i < effect_uniforms.size(); ++i) {
                                   string *glsl_string)
 {
        for (unsigned i = 0; i < effect_uniforms.size(); ++i) {
@@ -327,10 +327,10 @@ void extract_uniform_declarations(const vector<Uniform<T> > &effect_uniforms,
 }
 
 template<class T>
 }
 
 template<class T>
-void extract_uniform_array_declarations(const vector<Uniform<T> > &effect_uniforms,
+void extract_uniform_array_declarations(const vector<Uniform<T>> &effect_uniforms,
                                         const string &type_specifier,
                                         const string &effect_id,
                                         const string &type_specifier,
                                         const string &effect_id,
-                                        vector<Uniform<T> > *phase_uniforms,
+                                        vector<Uniform<T>> *phase_uniforms,
                                         string *glsl_string)
 {
        for (unsigned i = 0; i < effect_uniforms.size(); ++i) {
                                         string *glsl_string)
 {
        for (unsigned i = 0; i < effect_uniforms.size(); ++i) {
@@ -347,7 +347,7 @@ void extract_uniform_array_declarations(const vector<Uniform<T> > &effect_unifor
 }
 
 template<class T>
 }
 
 template<class T>
-void collect_uniform_locations(GLuint glsl_program_num, vector<Uniform<T> > *phase_uniforms)
+void collect_uniform_locations(GLuint glsl_program_num, vector<Uniform<T>> *phase_uniforms)
 {
        for (unsigned i = 0; i < phase_uniforms->size(); ++i) {
                Uniform<T> &uniform = (*phase_uniforms)[i];
 {
        for (unsigned i = 0; i < phase_uniforms->size(); ++i) {
                Uniform<T> &uniform = (*phase_uniforms)[i];
index 54cf0e5d88869aec8e7e8e812bb0f4a44ec6797e..dc5e3c4aeb96ca0c585ee63d3c31350c2d6e60c8 100644 (file)
@@ -195,15 +195,15 @@ struct Phase {
        std::map<Node *, std::string> effect_ids;
 
        // Uniforms for this phase; combined from all the effects.
        std::map<Node *, std::string> effect_ids;
 
        // Uniforms for this phase; combined from all the effects.
-       std::vector<Uniform<int> > uniforms_image2d;
-       std::vector<Uniform<int> > uniforms_sampler2d;
-       std::vector<Uniform<bool> > uniforms_bool;
-       std::vector<Uniform<int> > uniforms_int;
-       std::vector<Uniform<float> > uniforms_float;
-       std::vector<Uniform<float> > uniforms_vec2;
-       std::vector<Uniform<float> > uniforms_vec3;
-       std::vector<Uniform<float> > uniforms_vec4;
-       std::vector<Uniform<Eigen::Matrix3d> > uniforms_mat3;
+       std::vector<Uniform<int>> uniforms_image2d;
+       std::vector<Uniform<int>> uniforms_sampler2d;
+       std::vector<Uniform<bool>> uniforms_bool;
+       std::vector<Uniform<int>> uniforms_int;
+       std::vector<Uniform<float>> uniforms_float;
+       std::vector<Uniform<float>> uniforms_vec2;
+       std::vector<Uniform<float>> uniforms_vec3;
+       std::vector<Uniform<float>> uniforms_vec4;
+       std::vector<Uniform<Eigen::Matrix3d>> uniforms_mat3;
 
        // For measurement of GPU time used.
        std::list<GLuint> timer_query_objects_running;
 
        // For measurement of GPU time used.
        std::list<GLuint> timer_query_objects_running;
index 10ab7886a549f692493cf9b8c558c46ff328d1be..e6f9bb64655022e4fcd41ce7d77a8f2ec3734ab2 100644 (file)
@@ -57,7 +57,7 @@ ResourcePool::~ResourcePool()
        void *context = get_gl_context_identifier();
        cleanup_unlinked_fbos(context);
 
        void *context = get_gl_context_identifier();
        cleanup_unlinked_fbos(context);
 
-       for (map<void *, std::list<FBOFormatIterator> >::iterator context_it = fbo_freelist.begin();
+       for (map<void *, std::list<FBOFormatIterator>>::iterator context_it = fbo_freelist.begin();
             context_it != fbo_freelist.end();
             ++context_it) {
                if (context_it->first != context) {
             context_it != fbo_freelist.end();
             ++context_it) {
                if (context_it->first != context) {
@@ -92,7 +92,7 @@ void ResourcePool::delete_program(GLuint glsl_program_num)
        }
        assert(found_program);
 
        }
        assert(found_program);
 
-       map<GLuint, stack<GLuint> >::iterator instance_list_it = program_instances.find(glsl_program_num);
+       map<GLuint, stack<GLuint>>::iterator instance_list_it = program_instances.find(glsl_program_num);
        assert(instance_list_it != program_instances.end());
 
        while (!instance_list_it->second.empty()) {
        assert(instance_list_it != program_instances.end());
 
        while (!instance_list_it->second.empty()) {
index 2324abc48749993f8a79a276f40081a958ef3d56..85a5e52cd0de92a040bbd4f79f8e5e305aef5bf0 100644 (file)
@@ -197,7 +197,7 @@ private:
        // By default, will only contain the program itself, but due to cloning
        // (see use_glsl_program()), may grow. Programs are taken off this list
        // while they are in use (by use_glsl_program()).
        // By default, will only contain the program itself, but due to cloning
        // (see use_glsl_program()), may grow. Programs are taken off this list
        // while they are in use (by use_glsl_program()).
-       std::map<GLuint, std::stack<GLuint> > program_instances;
+       std::map<GLuint, std::stack<GLuint>> program_instances;
 
        // For each program, the master program that created it
        // (inverse of program_instances).
 
        // For each program, the master program that created it
        // (inverse of program_instances).
@@ -245,7 +245,7 @@ private:
        // the last element will be deleted.
        //
        // We store iterators directly into <fbo_format> for efficiency.
        // the last element will be deleted.
        //
        // We store iterators directly into <fbo_format> for efficiency.
-       std::map<void *, std::list<FBOFormatIterator> > fbo_freelist;
+       std::map<void *, std::list<FBOFormatIterator>> fbo_freelist;
 
        // Very similar, for VAOs.
        struct VAO {
 
        // Very similar, for VAOs.
        struct VAO {
@@ -255,7 +255,7 @@ private:
        };
        std::map<std::pair<void *, GLuint>, VAO> vao_formats;
        typedef std::map<std::pair<void *, GLuint>, VAO>::iterator VAOFormatIterator;
        };
        std::map<std::pair<void *, GLuint>, VAO> vao_formats;
        typedef std::map<std::pair<void *, GLuint>, VAO>::iterator VAOFormatIterator;
-       std::map<void *, std::list<VAOFormatIterator> > vao_freelist;
+       std::map<void *, std::list<VAOFormatIterator>> vao_freelist;
 
        // See the caveats at the constructor.
        static size_t estimate_texture_size(const Texture2D &texture_format);
 
        // See the caveats at the constructor.
        static size_t estimate_texture_size(const Texture2D &texture_format);