From: Mikko Rasa Date: Thu, 17 Jan 2013 12:31:23 +0000 (+0200) Subject: Collection::get now returns a reference X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c984792845515b18f7b886c488c2500fd5443c8a;p=r2c2.git Collection::get now returns a reference --- diff --git a/source/3d/tracktype.cpp b/source/3d/tracktype.cpp index 243da7f..ab417cf 100644 --- a/source/3d/tracktype.cpp +++ b/source/3d/tracktype.cpp @@ -87,7 +87,7 @@ TrackType3D::TrackType3D(Catalogue3D &cat3d, const TrackType &tt): string obj_name = tt.get_object(); if(!obj_name.empty()) { - object = catalogue.get(obj_name); + object = &catalogue.get(obj_name); const GL::Mesh *m = object->get_mesh(); const GL::VertexArray &vertices = m->get_vertices(); int vertex_offs = vertices.get_format().offset(GL::VERTEX2); @@ -120,7 +120,7 @@ TrackType3D::TrackType3D(Catalogue3D &cat3d, const TrackType &tt): object = new GL::Object; object->set_mesh(mesh); - object->set_technique(catalogue.get(cat.get_track_technique())); + object->set_technique(&catalogue.get(cat.get_track_technique())); } unsigned paths = tt.get_paths(); diff --git a/source/3d/vehicletype.cpp b/source/3d/vehicletype.cpp index 427c29f..a2f4a34 100644 --- a/source/3d/vehicletype.cpp +++ b/source/3d/vehicletype.cpp @@ -137,7 +137,7 @@ GL::Object *VehicleType3D::get_object(const string &name) } } else - return catalogue.get(name); + return &catalogue.get(name); } return ptr; }