diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2019-01-23 01:58:28 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2019-03-06 01:26:24 +0000 |
| commit | e71e984af918104579da59e45785fe1651c5e992 (patch) | |
| tree | 9fe91c6e2b1237055e46dc4974c1003c2abc8d61 /src/file-update.cpp | |
| parent | Revert modal fix to fix #108 (diff) | |
| download | inkscape-e71e984af918104579da59e45785fe1651c5e992.tar.gz inkscape-e71e984af918104579da59e45785fe1651c5e992.zip | |
Avoid the “using std::*;” or “using namespace std;” constructs.
This makes the code a lot less readable and greppable for no reason.
Diffstat (limited to 'src/file-update.cpp')
| -rw-r--r-- | src/file-update.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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 <clocale> #include <string> +#include <vector> #include <gtkmm.h> @@ -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<SPObject *> cl = o->childList(false); + std::vector<SPObject *> cl = o->childList(false); bool beginning = true; - for (vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + for (std::vector<SPObject *>::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<SPObject *> cl = o->childList(false); - for (vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + std::vector<SPObject *> cl = o->childList(false); + for (std::vector<SPObject *>::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<SPObject *> cl = o->childList(false); - for (vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) + std::vector<SPObject *> cl = o->childList(false); + for (std::vector<SPObject *>::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<SPObject *> cl = o->childList(false); - for (vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) { + std::vector<SPObject *> cl = o->childList(false); + for (std::vector<SPObject *>::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<SPObject *> cl = o->childList(false); - for (vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) + std::vector<SPObject *> cl = o->childList(false); + for (std::vector<SPObject *>::const_iterator ci = cl.begin(); ci != cl.end(); ++ci) sp_file_text_run_recursive(f, *ci); } } |
