[poppler] goo/GooString.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Feb 23 17:27:22 UTC 2020


 goo/GooString.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 90a1441809fc6ca8713022bf8cb5530e9a7ae832
Author: Albert Astals Cid <aacid at kde.org>
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 <krh at redhat.com>
 // Copyright (C) 2006 Krzysztof Kowalczyk <kkowalczyk at gmail.com>
-// Copyright (C) 2008-2010, 2012, 2014, 2017-2019 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2008-2010, 2012, 2014, 2017-2020 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2012-2014 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013 Jason Crain <jason at aquaticape.us>
 // Copyright (C) 2015, 2018 Adam Reichold <adam.reichold at t-online.de>
@@ -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(); }
 


More information about the poppler mailing list