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/object/sp-item-update-cns.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/object/sp-item-update-cns.cpp')
| -rw-r--r-- | src/object/sp-item-update-cns.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/object/sp-item-update-cns.cpp b/src/object/sp-item-update-cns.cpp index f70d91b9f..c16627eab 100644 --- a/src/object/sp-item-update-cns.cpp +++ b/src/object/sp-item-update-cns.cpp @@ -8,31 +8,28 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ - +#include <vector> #include "satisfied-guide-cns.h" #include "sp-item-update-cns.h" #include "sp-guide.h" -using std::find; -using std::vector; - void sp_item_update_cns(SPItem &item, SPDesktop const &desktop) { std::vector<Inkscape::SnapCandidatePoint> snappoints; item.getSnappoints(snappoints, nullptr); /* TODO: Implement the ordering. */ - vector<SPGuideConstraint> found_cns; + std::vector<SPGuideConstraint> found_cns; satisfied_guide_cns(desktop, snappoints, found_cns); /* effic: It might be nice to avoid an n^2 algorithm, but in practice n will be small enough that it's still usually more efficient. */ - for (vector<SPGuideConstraint>::const_iterator fi(found_cns.begin()), + for (std::vector<SPGuideConstraint>::const_iterator fi(found_cns.begin()), fiEnd(found_cns.end()); fi != fiEnd; ++fi) { SPGuideConstraint const &cn = *fi; - if ( find(item.constraints.begin(), + if ( std::find(item.constraints.begin(), item.constraints.end(), cn) == item.constraints.end() ) |
