goo/GooString.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 90a1441809fc6ca8713022bf8cb5530e9a7ae832 Author: Albert Astals Cid <[email protected]> Date: Sun Feb 23 18:23:23 2020 +0100 GooString: remove duplicated code diff --git a/goo/GooString.h b/goo/GooString.h index af76356a..5d567a23 100644 --- a/goo/GooString.h +++ b/goo/GooString.h @@ -17,7 +17,7 @@ // // Copyright (C) 2006 Kristian Høgsberg <[email protected]> // Copyright (C) 2006 Krzysztof Kowalczyk <[email protected]> -// Copyright (C) 2008-2010, 2012, 2014, 2017-2019 Albert Astals Cid <[email protected]> +// Copyright (C) 2008-2010, 2012, 2014, 2017-2020 Albert Astals Cid <[email protected]> // Copyright (C) 2012-2014 Fabio D'Urso <[email protected]> // Copyright (C) 2013 Jason Crain <[email protected]> // Copyright (C) 2015, 2018 Adam Reichold <[email protected]> @@ -173,9 +173,9 @@ public: // Return true if string ends with suffix bool endsWith(const char *suffix) const; - bool hasUnicodeMarker() const { return size() >= 2 && (*this)[0] == '\xfe' && (*this)[1] == '\xff'; } + bool hasUnicodeMarker() const { return hasUnicodeMarker(*this); } static bool hasUnicodeMarker(const std::string& s) { return s.size() >= 2 && s[0] == '\xfe' && s[1] == '\xff'; } - bool hasUnicodeMarkerLE() const { return size() >= 2 && (*this)[0] == '\xff' && (*this)[1] == '\xfe'; } + bool hasUnicodeMarkerLE() const { return hasUnicodeMarkerLE(*this); } static bool hasUnicodeMarkerLE(const std::string& s) { return s.size() >= 2 && s[0] == '\xff' && s[1] == '\xfe'; } bool hasJustUnicodeMarker() const { return size() == 2 && hasUnicodeMarker(); } _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
