summaryrefslogtreecommitdiff
path: root/dviware/dvisvgm/src/GraphicsPath.hpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-08-26 03:02:29 +0000
committerNorbert Preining <norbert@preining.info>2021-08-26 03:02:29 +0000
commit059cab71c68a3fbee36f60e8208d4a47d11c6b60 (patch)
treec982bcbf00c931a1474d68bf51dfeba5918cf76c /dviware/dvisvgm/src/GraphicsPath.hpp
parent960421b0bcd1af561be3f2eb9468224969a7bd34 (diff)
CTAN sync 202108260302
Diffstat (limited to 'dviware/dvisvgm/src/GraphicsPath.hpp')
-rw-r--r--dviware/dvisvgm/src/GraphicsPath.hpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/dviware/dvisvgm/src/GraphicsPath.hpp b/dviware/dvisvgm/src/GraphicsPath.hpp
index 64c112ad0b..a0c9f8ab8f 100644
--- a/dviware/dvisvgm/src/GraphicsPath.hpp
+++ b/dviware/dvisvgm/src/GraphicsPath.hpp
@@ -2,7 +2,7 @@
** GraphicsPath.hpp **
** **
** This file is part of dvisvgm -- a fast DVI to SVG converter **
-** Copyright (C) 2005-2020 Martin Gieseking <martin.gieseking@uos.de> **
+** Copyright (C) 2005-2021 Martin Gieseking <martin.gieseking@uos.de> **
** **
** This program is free software; you can redistribute it and/or **
** modify it under the terms of the GNU General Public License as **
@@ -20,6 +20,7 @@
#pragma once
+#include <algorithm>
#include <array>
#include <cctype>
#include <cmath>
@@ -662,24 +663,14 @@ class GraphicsPath {
bool operator == (const GraphicsPath &path) const {
if (size() != path.size())
return false;
- auto it = _commands.begin();
- for (const auto &cmd : path._commands) {
- if (*it++ != cmd)
- return false;
- }
- return true;
+ return std::equal(_commands.begin(), _commands.end(), path._commands.begin());
}
/** Returns true if this path differs from another one (command-wise). */
bool operator != (const GraphicsPath &path) const {
if (size() != path.size())
return true;
- auto it = _commands.begin();
- for (const auto &cmd : path._commands) {
- if (*it++ != cmd)
- return true;
- }
- return false;
+ return !std::equal(_commands.begin(), _commands.end(), path._commands.begin());
}
/** Iterates over all commands defining this path and calls the corresponding template methods.