summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a36ff2)
raw | patch | inline | side by side (parent: 0a36ff2)
author | JucaBlues <JucaBlues@users.sourceforge.net> | |
Sun, 8 Feb 2009 23:54:32 +0000 (23:54 +0000) | ||
committer | JucaBlues <JucaBlues@users.sourceforge.net> | |
Sun, 8 Feb 2009 23:54:32 +0000 (23:54 +0000) |
warning: suggest a space before ‘;’ or explicit braces around empty body
in 'for'/'while' statement
in 'for'/'while' statement
index 433625b8cde6bd8fb3ccddf12abd2a2c24df2f76..934045b33119029a72eee8d3c5555e7c1c4624b1 100644 (file)
--- 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;
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);
index 640bf143df51f85321d8ec5d6928352e5c31ba60..3941ddcfc154cb98a1737577f78cea51904b2209 100644 (file)
--- a/src/extension/timer.cpp
+++ b/src/extension/timer.cpp
ExpirationTimer * prev;
for (prev = timer_list;
prev->next != this;
- prev = prev->next);
+ prev = prev->next){};
prev->next = next;
if (idle_start == this)
index 8dd61c4916dadf8b52fa796cd0d6113a7f0ca919..0fc061bfc38f0c33f763edd37fc3a912ae634b80 100644 (file)
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
{
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 5ee801230862cd589698b533075123371cd07f8e..4bbabc965fbaf3360018461fe9bec96615e81192 100644 (file)
--- a/src/sp-clippath.cpp
+++ b/src/sp-clippath.cpp
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 9280b604f9d04c7e839851a1fc1005b4a623ac4c..c6c0950146790700ce1b24d4f01322e425d9768e 100644 (file)
--- 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 00244c122133d284eebfde8182961fd8fd2c6980..83f9ecfa6e3cf2f8a1b9d98a432789fa7449c3a2 100644 (file)
--- 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 9da95df904906e9d947ea5327c9ba7c088bbd5bd..89a86218efb37d0318ce3a0d35505ad8a4ab9ab4 100644 (file)
--- 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 482f6faebec07e79a5f52e65007dc32a6ac45d2d..2ccc9119520940f5812da48bb557867b66a3a494 100644 (file)
--- a/src/text-editing.cpp
+++ b/src/text-editing.cpp
}
}
- 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 94a1a2fad604f5463122ae8a1205ce8fe792673d..081fbba64c100f9b0900d9a47abf89cd17b1b199 100644 (file)
--- 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
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.