jmestwa-coder commented on code in PR #635:
URL: https://github.com/apache/logging-log4cxx/pull/635#discussion_r3135795340
##########
src/main/cpp/stringhelper.cpp:
##########
@@ -24,24 +24,33 @@
#include <iterator>
#include <algorithm>
#include <cctype>
+#include <string>
using namespace LOG4CXX_NS;
using namespace LOG4CXX_NS::helpers;
bool StringHelper::equalsIgnoreCase(const LogString& s1, const logchar* upper,
const logchar* lower)
{
- for (const auto& item : s1)
+ const size_t len_upper = std::char_traits<logchar>::length(upper);
Review Comment:
Thanks for the feedback. I've updated the implementation to retain the
range-based loop while keeping the explicit length check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]