From e71e984af918104579da59e45785fe1651c5e992 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 23 Jan 2019 02:58:28 +0100 Subject: =?UTF-8?q?Avoid=20the=20=E2=80=9Cusing=20std::*;=E2=80=9D=20or=20?= =?UTF-8?q?=E2=80=9Cusing=20namespace=20std;=E2=80=9D=20constructs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the code a lot less readable and greppable for no reason. --- src/file-update.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/file-update.cpp') diff --git a/src/file-update.cpp b/src/file-update.cpp index 22dd022bc..f35107e2d 100644 --- a/src/file-update.cpp +++ b/src/file-update.cpp @@ -19,6 +19,7 @@ */ #include #include +#include #include @@ -64,7 +65,6 @@ using Inkscape::DocumentUndo; -using namespace std; int sp_file_convert_dpi_method_commandline = -1; // Unset @@ -85,9 +85,9 @@ void fix_blank_line(SPObject *o) SPIFontSize fontsize = o->style->font_size; SPILengthOrNormal lineheight = o->style->line_height; - vector cl = o->childList(false); + std::vector cl = o->childList(false); bool beginning = true; - for (vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + for (std::vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { SPObject *i = *ci; if ((SP_IS_TSPAN(i) && is_line(i)) || SP_IS_FLOWPARA(i) || SP_IS_FLOWDIV(i)) { if (sp_text_get_length((SPItem *)i) <= 1) { // empty line @@ -116,8 +116,8 @@ void fix_line_spacing(SPObject *o) { SPILengthOrNormal lineheight = o->style->line_height; bool inner = false; - vector cl = o->childList(false); - for (vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + std::vector cl = o->childList(false); + for (std::vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { SPObject *i = *ci; if ((SP_IS_TSPAN(i) && is_line(i)) || SP_IS_FLOWPARA(i) || SP_IS_FLOWDIV(i)) { // if no line-height attribute, set it @@ -138,10 +138,10 @@ void fix_line_spacing(SPObject *o) void fix_font_name(SPObject *o) { - vector cl = o->childList(false); - for (vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) + std::vector cl = o->childList(false); + for (std::vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) fix_font_name(*ci); - string prev = o->style->font_family.value ? o->style->font_family.value : o->style->font_family.value_default; + std::string prev = o->style->font_family.value ? o->style->font_family.value : o->style->font_family.value_default; if (prev == "Sans") o->style->font_family.read("sans-serif"); else if (prev == "Serif") @@ -157,8 +157,8 @@ void fix_font_size(SPObject *o) if (!fontsize.set) return; bool inner = false; - vector cl = o->childList(false); - for (vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + std::vector cl = o->childList(false); + for (std::vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { SPObject *i = *ci; fix_font_size(i); if ((SP_IS_TSPAN(i) && is_line(i)) || SP_IS_FLOWPARA(i) || SP_IS_FLOWDIV(i)) { @@ -181,8 +181,8 @@ void sp_file_text_run_recursive(void (*f)(SPObject *), SPObject *o) if (SP_IS_TEXT(o) || SP_IS_FLOWTEXT(o)) f(o); else { - vector cl = o->childList(false); - for (vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) + std::vector cl = o->childList(false); + for (std::vector::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) sp_file_text_run_recursive(f, *ci); } } -- cgit v1.2.3