summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2019-03-06 23:54:12 +0000
committerMartin Owens <doctormo@gmail.com>2019-03-06 23:54:12 +0000
commit3711d5d705436c20590c1ff4cef12e67beed6597 (patch)
tree9026f75a574bc3b9b531acb959eced87c5d4a9f7 /src/ui/widget
parentMerge: Correct text for enabling grid (diff)
parentAvoid the “using std::*;” or “using namespace std;” constructs. (diff)
downloadinkscape-3711d5d705436c20590c1ff4cef12e67beed6597.tar.gz
inkscape-3711d5d705436c20590c1ff4cef12e67beed6597.zip
Merge: Avoid the “using std::*;” or “using namespace std;” construct
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/page-sizer.cpp14
-rw-r--r--src/ui/widget/preview.cpp8
2 files changed, 7 insertions, 15 deletions
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index 030e90af0..df6af9626 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -27,9 +27,6 @@
#include "object/sp-root.h"
#include "io/resource.h"
-using std::pair;
-using Inkscape::Util::unit_table;
-
namespace Inkscape {
namespace UI {
namespace Widget {
@@ -133,7 +130,7 @@ PageSizer::PageSizer(Registry & _wr)
snprintf(formatBuf, 79, "%0.1f x %0.1f", width, height);
Glib::ustring desc = formatBuf;
desc.append(" " + std::string(line[3]));
- PaperSize paper(name, width, height, unit_table.getUnit(line[3]));
+ PaperSize paper(name, width, height, Inkscape::Util::unit_table.getUnit(line[3]));
_paperSizeTable[name] = paper;
Gtk::TreeModel::Row row = *(_paperSizeListStore->append());
row[_paperSizeListColumns.nameColumn] = name;
@@ -450,12 +447,9 @@ PageSizer::updateFitMarginsUI(Inkscape::XML::Node *nv_repr)
Gtk::ListStore::iterator
PageSizer::find_paper_size (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h) const
{
- using Inkscape::Util::Quantity;
- using std::swap;
-
// The code below assumes that w < h, so make sure that's the case:
if ( h < w ) {
- swap(h,w);
+ std::swap(h,w);
}
g_return_val_if_fail(w <= h, _paperSizeListStore->children().end());
@@ -464,8 +458,8 @@ PageSizer::find_paper_size (Inkscape::Util::Quantity w, Inkscape::Util::Quantity
for (iter = _paperSizeTable.begin() ;
iter != _paperSizeTable.end() ; ++iter) {
PaperSize paper = iter->second;
- Quantity smallX (paper.smaller, paper.unit);
- Quantity largeX (paper.larger, paper.unit);
+ Inkscape::Util::Quantity smallX (paper.smaller, paper.unit);
+ Inkscape::Util::Quantity largeX (paper.larger, paper.unit);
g_return_val_if_fail(smallX.quantity < largeX.quantity + 0.001, _paperSizeListStore->children().end());
diff --git a/src/ui/widget/preview.cpp b/src/ui/widget/preview.cpp
index f22032b65..2de9a9a28 100644
--- a/src/ui/widget/preview.cpp
+++ b/src/ui/widget/preview.cpp
@@ -36,8 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include <algorithm>
-using std::min;
-
#include <gdkmm/general.h>
#include "preview.h"
#include "preferences.h"
@@ -272,7 +270,7 @@ Preview::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
context->render_arrow(cr,
G_PI, // Down-pointing arrow
area.x, area.y,
- min(area.width, area.height)
+ std::min(area.width, area.height)
);
}
@@ -286,7 +284,7 @@ Preview::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
context->render_arrow(cr,
G_PI, // Down-pointing arrow
otherArea.x, otherArea.y,
- min(otherArea.width, otherArea.height)
+ std::min(otherArea.width, otherArea.height)
);
}
@@ -300,7 +298,7 @@ Preview::on_draw(const Cairo::RefPtr<Cairo::Context> &cr)
context->render_arrow(cr,
1.5*G_PI, // Left-pointing arrow
otherArea.x, otherArea.y,
- min(otherArea.width, otherArea.height)
+ std::min(otherArea.width, otherArea.height)
);
}