Avoid warnings from g++ 4.3.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 25 Jan 2008 18:11:04 +0000 (18:11 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 25 Jan 2008 18:11:04 +0000 (18:11 +0000)
git-svn-id: http://svn.voria.com/code@1491 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp
synfig-studio/trunk/src/gtkmm/render.cpp
synfig-studio/trunk/src/gtkmm/state_bline.cpp
synfig-studio/trunk/src/gtkmm/state_circle.cpp
synfig-studio/trunk/src/gtkmm/state_draw.cpp
synfig-studio/trunk/src/gtkmm/state_gradient.cpp
synfig-studio/trunk/src/gtkmm/state_polygon.cpp
synfig-studio/trunk/src/gtkmm/state_rectangle.cpp
synfig-studio/trunk/src/gtkmm/widget_compselect.cpp

index 9452734..f947077 100644 (file)
@@ -851,7 +851,8 @@ KeyframeTreeStore::change_keyframe(synfig::Keyframe keyframe)
                unsigned int new_index(get_index_from_model_iter(row));
                unsigned int old_index(0);
                synfig::KeyframeList::iterator iter;
-               for(old_index=0,iter=old_keyframe_list.begin();iter!=old_keyframe_list.end() && (UniqueID)*iter!=(UniqueID)keyframe;++iter,old_index++);
+               for(old_index=0,iter=old_keyframe_list.begin();iter!=old_keyframe_list.end() && (UniqueID)*iter!=(UniqueID)keyframe;++iter,old_index++)
+                       ;
 
                if(iter!=old_keyframe_list.end() && new_index!=old_index)
                {
index 19d338e..7b9e70d 100644 (file)
@@ -197,10 +197,12 @@ RenderSettings::set_entry_filename()
        // if this isn't the root canvas, append (<canvasname>) to the filename
        etl::handle<synfig::Canvas> canvas = canvas_interface_->get_canvas();
        if (!canvas->is_root())
+       {
                if(canvas->get_name().empty())
                        filename+=" ("+canvas->get_id()+')';
                else
                        filename+=" ("+canvas->get_name()+')';
+       }
 
        filename += ".png";
 
index 31dfddb..6aa1072 100644 (file)
@@ -305,7 +305,10 @@ StateBLine_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
index 1208572..3bad7bf 100644 (file)
@@ -244,7 +244,10 @@ StateCircle_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
index 8bda933..b8c90f3 100644 (file)
@@ -368,7 +368,10 @@ StateDraw_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
@@ -822,6 +825,7 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                        // don't extend looped blines
                        if(finish_duck_value_node_bline&&!finish_duck_value_node_bline->get_loop()&&
                           (finish_duck_index==0||finish_duck_index==finish_duck_value_node_bline->link_count()-1))
+                       {
                                if(extend_start)
                                {
                                        // we've started and finished drawing at the end of a bline.  we can't
@@ -834,6 +838,7 @@ StateDraw_Context::new_bline(std::list<synfig::BLinePoint> bline,bool loop_bline
                                        shift_offset=true;
                                        shift_offset_vector=finish_duck->get_origin();
                                }
+                       }
                }while(0);
 
                // if the new line's start didn't extend an existing line,
@@ -1232,10 +1237,12 @@ debug_show_vertex_list(int iteration, std::list<synfigapp::ValueDesc>& vertex_li
        {
                if (started) printf(", "); else started = true;
                if (start != -1)
+               {
                        if (dir != 0)
                                printf("%d--%d", start, prev);
                        else
                                printf("%d", start);
+               }
                printf(")");
        }
        printf("\n");
@@ -1388,12 +1395,14 @@ StateDraw_Context::new_region(std::list<synfig::BLinePoint> bline, synfig::Real
                                this_index = iter->get_index();
                                // printf("index went from %d to %d\n", last_index, this_index);
                                if (looped)
+                               {
                                        if (this_index - last_index > points_in_line/2)
                                                while (this_index - last_index > points_in_line/2)
                                                        this_index -= points_in_line;
                                        else if (last_index - this_index > points_in_line/2)
                                                while (last_index - this_index > points_in_line/2)
                                                        this_index += points_in_line;
+                               }
 
                                if (this_index < min_index) min_index = this_index;
                                if (this_index > max_index) max_index = this_index;
index 804813f..55b9277 100644 (file)
@@ -216,7 +216,10 @@ StateGradient_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
index 3d0dd01..410947a 100644 (file)
@@ -188,7 +188,10 @@ StatePolygon_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
index 830bdb1..e672d6c 100644 (file)
@@ -213,7 +213,10 @@ StateRectangle_Context::increment_id()
        if(id[id.size()-1]<='9' && id[id.size()-1]>='0')
        {
                // figure out how many digits it is
-               for(digits=0;(int)id.size()-1>=digits && id[id.size()-1-digits]<='9' && id[id.size()-1-digits]>='0';digits++)while(false);
+               for (digits = 0;
+                        (int)id.size()-1 >= digits && id[id.size()-1-digits] <= '9' && id[id.size()-1-digits] >= '0';
+                        digits++)
+                       ;
 
                String str_number;
                str_number=String(id,id.size()-digits,id.size());
index 5877486..51eb3db 100644 (file)
@@ -98,7 +98,8 @@ Widget_CompSelect::set_selected_instance(etl::loose_handle<studio::Instance> x)
        if(x)
        {
                int i;
-               for(i=0,iter=studio::App::instance_list.begin();iter!=studio::App::instance_list.end() && ((*iter)!=x);iter++,i++);
+               for(i=0,iter=studio::App::instance_list.begin();iter!=studio::App::instance_list.end() && ((*iter)!=x);iter++,i++)
+                       ;
 
                assert(*iter==x);