diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2019-01-02 09:41:30 +0000 |
| commit | 169dff19d4da8d76e69b8e896aa25b0013639c03 (patch) | |
| tree | a0c070fa95188b5cde708ac285e6a2db9df4a83f /src/ui/tools/text-tool.cpp | |
| parent | Avoid creating a new document before opening an old document. (diff) | |
| download | inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.tar.gz inkscape-169dff19d4da8d76e69b8e896aa25b0013639c03.zip | |
modernize loops
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
| -rw-r--r-- | src/ui/tools/text-tool.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp index 4de0dc81f..f27f37300 100644 --- a/src/ui/tools/text-tool.cpp +++ b/src/ui/tools/text-tool.cpp @@ -244,10 +244,9 @@ void TextTool::finish() { this->frame = nullptr; } - for (std::vector<SPCanvasItem*>::iterator it = this->text_selection_quads.begin() ; - it != this->text_selection_quads.end() ; ++it) { - sp_canvas_item_hide(*it); - sp_canvas_item_destroy(*it); + for (auto & text_selection_quad : this->text_selection_quads) { + sp_canvas_item_hide(text_selection_quad); + sp_canvas_item_destroy(text_selection_quad); } this->text_selection_quads.clear(); @@ -1702,9 +1701,9 @@ static void sp_text_context_update_text_selection(TextTool *tc) // the selection update (can't do both atomically, alas) if (!tc->desktop) return; - for (std::vector<SPCanvasItem*>::iterator it = tc->text_selection_quads.begin() ; it != tc->text_selection_quads.end() ; ++it) { - sp_canvas_item_hide(*it); - sp_canvas_item_destroy(*it); + for (auto & text_selection_quad : tc->text_selection_quads) { + sp_canvas_item_hide(text_selection_quad); + sp_canvas_item_destroy(text_selection_quad); } tc->text_selection_quads.clear(); |
