]> git.tdb.fi Git - r2c2.git/commitdiff
Fix some uninitialized variable warnings
authorMikko Rasa <tdb@tdb.fi>
Fri, 29 Oct 2010 21:29:00 +0000 (21:29 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 29 Oct 2010 21:29:00 +0000 (21:29 +0000)
source/designer/manipulator.cpp
source/designer/trackwrap.cpp

index 9af1e60a0aa94f7f506b3fa77357a7a8af6cbb3e..850f79f8be25d857721757004b4ab2a3b8535ebf 100644 (file)
@@ -227,7 +227,7 @@ void Manipulator::connect()
        float dir1;
        Track *track2 = tracks.back().track;
        bool ok = false;
-       float gap;
+       float gap = 0;
        for(unsigned i=0; i<track1->get_type().get_endpoints().size(); ++i)
        {
                if(track1->get_link(i))
index 3c5a834badbf2d24a0c581be63009c50189ceea8..b5070757efad2697e2ddc513934b33f172bc18d7 100644 (file)
@@ -57,10 +57,10 @@ GL::Mesh &TrackWrap::get_mesh(const TrackType &type)
        const TrackType3D &type3d = designer.get_layout_3d().get_catalogue().get_track(type);
 
        float min_area = -1;
-       float angle;
+       float angle = 0;
        Point center;
-       float width;
-       float height;
+       float width = 0;
+       float height = 0;
        for(float a=0; a<M_PI; a+=0.01)
        {
                Point minp, maxp;