From: dooglus Date: Fri, 25 Jan 2008 18:11:04 +0000 (+0000) Subject: Avoid warnings from g++ 4.3. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7c7a0076ee45cffd2165eefe4ede81e4a631ac18;p=synfig.git Avoid warnings from g++ 4.3. git-svn-id: http://svn.voria.com/code@1491 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp index 9452734..f947077 100644 --- a/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp +++ b/synfig-studio/trunk/src/gtkmm/keyframetreestore.cpp @@ -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) { diff --git a/synfig-studio/trunk/src/gtkmm/render.cpp b/synfig-studio/trunk/src/gtkmm/render.cpp index 19d338e..7b9e70d 100644 --- a/synfig-studio/trunk/src/gtkmm/render.cpp +++ b/synfig-studio/trunk/src/gtkmm/render.cpp @@ -197,10 +197,12 @@ RenderSettings::set_entry_filename() // if this isn't the root canvas, append () to the filename etl::handle 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"; diff --git a/synfig-studio/trunk/src/gtkmm/state_bline.cpp b/synfig-studio/trunk/src/gtkmm/state_bline.cpp index 31dfddb..6aa1072 100644 --- a/synfig-studio/trunk/src/gtkmm/state_bline.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_bline.cpp @@ -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()); diff --git a/synfig-studio/trunk/src/gtkmm/state_circle.cpp b/synfig-studio/trunk/src/gtkmm/state_circle.cpp index 1208572..3bad7bf 100644 --- a/synfig-studio/trunk/src/gtkmm/state_circle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_circle.cpp @@ -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()); diff --git a/synfig-studio/trunk/src/gtkmm/state_draw.cpp b/synfig-studio/trunk/src/gtkmm/state_draw.cpp index 8bda933..b8c90f3 100644 --- a/synfig-studio/trunk/src/gtkmm/state_draw.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_draw.cpp @@ -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 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 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& 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 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; diff --git a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp index 804813f..55b9277 100644 --- a/synfig-studio/trunk/src/gtkmm/state_gradient.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_gradient.cpp @@ -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()); diff --git a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp index 3d0dd01..410947a 100644 --- a/synfig-studio/trunk/src/gtkmm/state_polygon.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_polygon.cpp @@ -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()); diff --git a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp index 830bdb1..e672d6c 100644 --- a/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp +++ b/synfig-studio/trunk/src/gtkmm/state_rectangle.cpp @@ -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()); diff --git a/synfig-studio/trunk/src/gtkmm/widget_compselect.cpp b/synfig-studio/trunk/src/gtkmm/widget_compselect.cpp index 5877486..51eb3db 100644 --- a/synfig-studio/trunk/src/gtkmm/widget_compselect.cpp +++ b/synfig-studio/trunk/src/gtkmm/widget_compselect.cpp @@ -98,7 +98,8 @@ Widget_CompSelect::set_selected_instance(etl::loose_handle 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);