From: Alex Rousskov Date: Sun, 14 Aug 2016 01:17:57 +0000 (-0600) Subject: Fixed build on systems needing explicit in RegexPattern.cc. X-Git-Tag: SQUID_4_0_14~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6226856f96001f85ff00267c25e5dae545895ccf;p=thirdparty%2Fsquid.git Fixed build on systems needing explicit in RegexPattern.cc. ... after r14795. Also removed bogus comments implying that std::move() does something to its argument. That function is just a type cast; it does nothing else! We use std::move() so that the compiler picks a move constructor or assignment (where available). In case of RegexPattern::flags, using std::move() has no effect because integers do not have those move methods. However, it may be a good idea to use std::move() anyway because the type of RegexPattern::flags might change in the future and for consistency sake. Thus, I did not remove std::move(), only comments. --- diff --git a/src/base/RegexPattern.cc b/src/base/RegexPattern.cc index 4ab829aa8a..b6923326d4 100644 --- a/src/base/RegexPattern.cc +++ b/src/base/RegexPattern.cc @@ -8,6 +8,7 @@ #include "squid.h" #include "base/RegexPattern.h" +#include RegexPattern::RegexPattern(int aFlags, const char *aPattern) : flags(aFlags), @@ -17,7 +18,7 @@ RegexPattern::RegexPattern(int aFlags, const char *aPattern) : } RegexPattern::RegexPattern(RegexPattern &&o) : - flags(std::move(o.flags)), // does o.flags=0 + flags(std::move(o.flags)), regex(std::move(o.regex)), pattern(std::move(o.pattern)) { @@ -34,7 +35,7 @@ RegexPattern::~RegexPattern() RegexPattern & RegexPattern::operator =(RegexPattern &&o) { - flags = std::move(o.flags); // does o.flags=0 + flags = std::move(o.flags); regex = std::move(o.regex); memset(&o.regex, 0, sizeof(o.regex)); pattern = std::move(o.pattern);