]> git.tdb.fi Git - libs/gl.git/blobdiff - source/object.cpp
Style update: add spaces around assignment operators
[libs/gl.git] / source / object.cpp
index 2423fcdab3fa353c47639484953e07cef1a68a5f..938e83f911211cd75b2e50302b6ad00d67345005 100644 (file)
@@ -40,7 +40,7 @@ Object::~Object()
 
 void Object::render(const Tag &tag) const
 {
-       const RenderPass *pass=get_pass(tag);
+       const RenderPass *pass = get_pass(tag);
        if(!pass)
                return;
 
@@ -50,7 +50,7 @@ void Object::render(const Tag &tag) const
 
 void Object::render(const ObjectInstance &inst, const Tag &tag) const
 {
-       const RenderPass *pass=get_pass(tag);
+       const RenderPass *pass = get_pass(tag);
        if(!pass)
                return;
 
@@ -69,7 +69,7 @@ const RenderPass *Object::get_pass(const Tag &tag) const
 void Object::render_instance(const ObjectInstance &inst, const Tag &tag) const
 {
        inst.setup_render(tag);
-       unsigned lod=min<unsigned>(inst.get_level_of_detail(), meshes.size()-1);
+       unsigned lod = min<unsigned>(inst.get_level_of_detail(), meshes.size()-1);
        meshes[lod]->draw();
        inst.finish_render(tag);
 }
@@ -89,7 +89,7 @@ Object::Loader::Loader(Object &o, Collection &c):
 
 void Object::Loader::init()
 {
-       allow_pointer_reload=false;
+       allow_pointer_reload = false;
 
        add("lod_mesh", &Loader::lod_mesh);
        add("mesh",     static_cast<void (Loader::*)()>(&Loader::mesh));
@@ -101,7 +101,7 @@ void Object::Loader::init()
 void Object::Loader::lod_mesh(unsigned l, const string &n)
 {
        obj.meshes.resize(l+1, 0);
-       obj.meshes[l]=get_collection().get<Mesh>(n);
+       obj.meshes[l] = get_collection().get<Mesh>(n);
 }
 
 void Object::Loader::mesh()
@@ -109,10 +109,10 @@ void Object::Loader::mesh()
        if(obj.meshes[0])
                throw InvalidState("A mesh is already loaded");
 
-       RefPtr<Mesh> msh=new Mesh;
+       RefPtr<Mesh> msh = new Mesh;
        load_sub(*msh);
-       obj.meshes[0]=msh.release();
-       obj.own_mesh=true;
+       obj.meshes[0] = msh.release();
+       obj.own_mesh = true;
 }
 
 void Object::Loader::mesh(const std::string &n)
@@ -120,18 +120,18 @@ void Object::Loader::mesh(const std::string &n)
        if(obj.meshes[0])
                throw InvalidState("A mesh is already loaded");
 
-       obj.meshes[0]=get_collection().get<Mesh>(n);
+       obj.meshes[0] = get_collection().get<Mesh>(n);
 }
 
 void Object::Loader::technique()
 {
-       RefPtr<Technique> tech=new Technique;
+       RefPtr<Technique> tech = new Technique;
        if(coll)
                load_sub(*tech, get_collection());
        else
                load_sub(*tech);
-       obj.technique=tech.release();
-       obj.own_technique=true;
+       obj.technique = tech.release();
+       obj.own_technique = true;
 }
 
 } // namespace GL