Commit 20060fae authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #7842: fix assignment operator for Pattern

The assignment operator should return *this, see item 15 of "Effective C++"
parent 913bf265
......@@ -94,14 +94,16 @@ class Pattern {
*
* @param pattern The new pattern
*/
void operator= (const std::string& pattern) {
Pattern& operator=(const std::string& pattern) {
pattern_ = pattern;
compile();
return *this;
}
void operator= (const char * pattern) {
Pattern& operator=(const char * pattern) {
pattern_ = pattern;
compile();
return *this;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment