summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFelipe Corr??a da Silva Sanches <juca@members.fsf.org>2009-02-08 23:54:32 +0000
committerJucaBlues <JucaBlues@users.sourceforge.net>2009-02-08 23:54:32 +0000
commitbbac3773a111069893e6522cce0ee316d5801bcf (patch)
tree5dfd373c1c713136533647bfeb5066a654c25113 /src
parentscale x-axis-rotation angle in elliptical arc (diff)
downloadinkscape-bbac3773a111069893e6522cce0ee316d5801bcf.tar.gz
inkscape-bbac3773a111069893e6522cce0ee316d5801bcf.zip
gcc warning cleanup:
warning: suggest a space before ‘;’ or explicit braces around empty body in 'for'/'while' statement (bzr r7251)
Diffstat (limited to 'src')
-rw-r--r--src/dialogs/xml-tree.cpp4
-rw-r--r--src/extension/timer.cpp2
-rw-r--r--src/libnrtype/Layout-TNG-OutIter.cpp6
-rw-r--r--src/sp-clippath.cpp4
-rw-r--r--src/sp-flowtext.cpp2
-rw-r--r--src/sp-tref.cpp2
-rw-r--r--src/sp-tspan.cpp2
-rw-r--r--src/text-editing.cpp4
-rw-r--r--src/ui/clipboard.cpp4
9 files changed, 15 insertions, 15 deletions
diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp
index 433625b8c..934045b33 100644
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
@@ -1146,7 +1146,7 @@ void on_tree_select_row_enable_if_indentable(GtkCTree *tree, GtkCTreeNode *node,
// skip to the child just before the current repr
for ( prev = parent->firstChild() ;
prev && prev->next() != repr ;
- prev = prev->next() );
+ prev = prev->next() ){};
if (prev && prev->type() == Inkscape::XML::ELEMENT_NODE) {
indentable = TRUE;
@@ -1545,7 +1545,7 @@ void cmd_indent_node(GtkObject */*object*/, gpointer /*data*/)
Inkscape::XML::Node* ref = NULL;
if (prev->firstChild()) {
- for( ref = prev->firstChild() ; ref->next() ; ref = ref->next() );
+ for( ref = prev->firstChild() ; ref->next() ; ref = ref->next() ){};
}
parent->removeChild(repr);
diff --git a/src/extension/timer.cpp b/src/extension/timer.cpp
index 640bf143d..3941ddcfc 100644
--- a/src/extension/timer.cpp
+++ b/src/extension/timer.cpp
@@ -72,7 +72,7 @@ ExpirationTimer::~ExpirationTimer(void)
ExpirationTimer * prev;
for (prev = timer_list;
prev->next != this;
- prev = prev->next);
+ prev = prev->next){};
prev->next = next;
if (idle_start == this)
diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp
index 8dd61c491..0fc061bfc 100644
--- a/src/libnrtype/Layout-TNG-OutIter.cpp
+++ b/src/libnrtype/Layout-TNG-OutIter.cpp
@@ -55,7 +55,7 @@ double Layout::_getChunkWidth(unsigned chunk_index) const
unsigned span_index;
if (chunk_index) {
span_index = _lineToSpan(_chunks[chunk_index].in_line);
- for ( ; span_index < _spans.size() && _spans[span_index].in_chunk < chunk_index ; span_index++);
+ for ( ; span_index < _spans.size() && _spans[span_index].in_chunk < chunk_index ; span_index++){};
} else
span_index = 0;
for ( ; span_index < _spans.size() && _spans[span_index].in_chunk == chunk_index ; span_index++)
@@ -518,7 +518,7 @@ void Layout::simulateLayoutUsingKerning(iterator const &from, iterator const &to
unsigned prev_cluster_char_index;
for (prev_cluster_char_index = char_index - 1 ;
prev_cluster_char_index != 0 && !_characters[prev_cluster_char_index].char_attributes.is_cursor_position ;
- prev_cluster_char_index--);
+ prev_cluster_char_index--){};
if (_characters[char_index].span(this).in_chunk == _characters[char_index - 1].span(this).in_chunk) {
// dx is zero for the first char in a chunk
// this algorithm works by comparing the summed widths of the glyphs with the observed
@@ -908,7 +908,7 @@ bool Layout::iterator::_cursorLeftOrRightLocalXByWord(Direction direction)
{
bool r;
while ((r = _cursorLeftOrRightLocalX(direction))
- && !_parent_layout->_characters[_char_index].char_attributes.is_word_start);
+ && !_parent_layout->_characters[_char_index].char_attributes.is_word_start){};
return r;
}
diff --git a/src/sp-clippath.cpp b/src/sp-clippath.cpp
index 5ee801230..4bbabc965 100644
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
@@ -328,7 +328,7 @@ void
sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform, unsigned const /*flags*/)
{
SPObject *i;
- for (i = sp_object_first_child(SP_OBJECT(cp)); i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i));
+ for (i = sp_object_first_child(SP_OBJECT(cp)); i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i)){};
if (!i) return;
sp_item_invoke_bbox_full(SP_ITEM(i), bbox, Geom::Matrix(SP_ITEM(i)->transform) * transform, SPItem::GEOMETRIC_BBOX, FALSE);
@@ -341,7 +341,7 @@ sp_clippath_get_bbox(SPClipPath *cp, NRRect *bbox, Geom::Matrix const &transform
nr_rect_d_union (bbox, bbox, &i_box);
}
i = SP_OBJECT_NEXT(i);
- for (; i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i));
+ for (; i && !SP_IS_ITEM(i); i = SP_OBJECT_NEXT(i)){};
}
}
diff --git a/src/sp-flowtext.cpp b/src/sp-flowtext.cpp
index 9280b604f..c6c095014 100644
--- a/src/sp-flowtext.cpp
+++ b/src/sp-flowtext.cpp
@@ -416,7 +416,7 @@ void SPFlowtext::_buildLayoutInput(SPObject *root, Shape const *exclusion_shape,
if (SP_IS_FLOWPARA(root)) {
// emulate par-indent with the first char's kern
SPObject *t = root;
- for ( ; t != NULL && !SP_IS_FLOWTEXT(t); t = SP_OBJECT_PARENT(t));
+ for ( ; t != NULL && !SP_IS_FLOWTEXT(t); t = SP_OBJECT_PARENT(t)){};
if (SP_IS_FLOWTEXT(t)) {
double indent = SP_FLOWTEXT(t)->par_indent;
if (indent != 0) {
diff --git a/src/sp-tref.cpp b/src/sp-tref.cpp
index 00244c122..83f9ecfa6 100644
--- a/src/sp-tref.cpp
+++ b/src/sp-tref.cpp
@@ -324,7 +324,7 @@ sp_tref_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &transform, un
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
- for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text));
+ for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text)){};
if (parent_text == NULL) return;
// get the bbox of our portion of the layout
diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp
index 9da95df90..89a86218e 100644
--- a/src/sp-tspan.cpp
+++ b/src/sp-tspan.cpp
@@ -207,7 +207,7 @@ static void sp_tspan_bbox(SPItem const *item, NRRect *bbox, Geom::Matrix const &
{
// find out the ancestor text which holds our layout
SPObject *parent_text = SP_OBJECT(item);
- for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text));
+ for (; parent_text != NULL && !SP_IS_TEXT(parent_text); parent_text = SP_OBJECT_PARENT (parent_text)){};
if (parent_text == NULL) return;
// get the bbox of our portion of the layout
diff --git a/src/text-editing.cpp b/src/text-editing.cpp
index 482f6faeb..2ccc91195 100644
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
@@ -779,7 +779,7 @@ sp_te_delete (SPItem *item, Inkscape::Text::Layout::iterator const &start,
}
}
- while (tidy_xml_tree_recursively(common_ancestor));
+ while (tidy_xml_tree_recursively(common_ancestor)){};
te_update_layout_now(item);
item->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
layout->validateIterator(&iter_pair.first);
@@ -1828,7 +1828,7 @@ void sp_te_apply_style(SPItem *text, Inkscape::Text::Layout::iterator const &sta
and neither option can be made to work, a fallback could be to reduce
everything to a single level of nesting and drop all pretence of
roundtrippability. */
- while (tidy_xml_tree_recursively(common_ancestor));
+ while (tidy_xml_tree_recursively(common_ancestor)){};
// if we only modified subobjects this won't have been automatically sent
text->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index 94a1a2fad..081fbba64 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -1020,7 +1020,7 @@ SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_targ
Inkscape::Extension::DB::InputList inlist;
Inkscape::Extension::db.get_input_list(inlist);
Inkscape::Extension::DB::InputList::const_iterator in = inlist.begin();
- for (; in != inlist.end() && target != (*in)->get_mimetype() ; ++in);
+ for (; in != inlist.end() && target != (*in)->get_mimetype() ; ++in){};
if ( in == inlist.end() )
return NULL; // this shouldn't happen unless _getBestTarget returns something bogus
@@ -1056,7 +1056,7 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/)
Inkscape::Extension::DB::OutputList outlist;
Inkscape::Extension::db.get_output_list(outlist);
Inkscape::Extension::DB::OutputList::const_iterator out = outlist.begin();
- for ( ; out != outlist.end() && target != (*out)->get_mimetype() ; ++out);
+ for ( ; out != outlist.end() && target != (*out)->get_mimetype() ; ++out){};
if ( out == outlist.end() && target != "image/png") return; // this also shouldn't happen
// FIXME: Temporary hack until we add support for memory output.