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 073780f..afac5dc 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::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;
 };
 
index 0c46768..ecf4208 100644 (file)
@@ -311,10 +311,10 @@ string replace_prefix(const string &text, const string &prefix)
 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,
-                                  vector<Uniform<T> > *phase_uniforms,
+                                  vector<Uniform<T>> *phase_uniforms,
                                   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>
-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,
-                                        vector<Uniform<T> > *phase_uniforms,
+                                        vector<Uniform<T>> *phase_uniforms,
                                         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>
-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];
index 54cf0e5..dc5e3c4 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::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;
index 10ab788..e6f9bb6 100644 (file)
@@ -57,7 +57,7 @@ ResourcePool::~ResourcePool()
        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) {
@@ -92,7 +92,7 @@ void ResourcePool::delete_program(GLuint glsl_program_num)
        }
        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()) {
index 2324abc..85a5e52 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()).
-       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).
@@ -245,7 +245,7 @@ private:
        // 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 {
@@ -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<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);