[icinga-checkins] icinga.org: icinga2/feature/string-compare: Still WIP

git at icinga.org git at icinga.org
Wed May 18 17:55:31 CEST 2016


Module: icinga2
Branch: feature/string-compare
Commit: 00e992921f7eb6bb9f0c657a405c2af6296cf23a
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=00e992921f7eb6bb9f0c657a405c2af6296cf23a

Author: Jean Flach <jean-marcel.flach at netways.de>
Date:   Wed May 18 17:55:16 2016 +0200

Still WIP

---

 lib/base/string.cpp |    7 ++++---
 lib/base/string.hpp |    1 -
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/base/string.cpp b/lib/base/string.cpp
index 70d6e5a..b945796 100644
--- a/lib/base/string.cpp
+++ b/lib/base/string.cpp
@@ -30,12 +30,13 @@ REGISTER_BUILTIN_TYPE(String, String::GetPrototype());
 
 const String::SizeType String::NPos = std::string::npos;
 
-unsigned int TimeConstantCompare(const String& s) const {
-	String hashA = I2_BASE_API::SHA256(this), hashB = I2_BASE_API::SHA256(s);
+unsigned int String::TimeConstantCompare(const String& s) const
+{
+	String hashA = SHA256(this), hashB = SHA256(s);
 	return !(hashA.PrivCompare(hashB, 256) == s.PrivCompare(this);
 }
 
-unsigned int PrivCompare(const String& s, const int size = -1) const
+unsigned int String::PrivCompare(const String& s, const int size = -1) const
 {
 	ConstIterator itA = this.Begin(), itB = s.Begin();
 	int end = (size != -1 ? size) :
diff --git a/lib/base/string.hpp b/lib/base/string.hpp
index 062ab8f..c7ab012 100644
--- a/lib/base/string.hpp
+++ b/lib/base/string.hpp
@@ -303,7 +303,6 @@ public:
 	{
 		return m_Data.rbegin();
 	}
-	}
 
 	inline ConstReverseIterator RBegin(void) const
 	{



More information about the icinga-checkins mailing list