From 20060faed7e846ab925488eb18f602ef012f293b Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Tue, 15 Nov 2011 14:06:58 -0500
Subject: [PATCH] * #7842: fix assignment operator for Pattern

The assignment operator should return *this, see item 15 of "Effective C++"
---
 daemon/src/sip/pattern.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/daemon/src/sip/pattern.h b/daemon/src/sip/pattern.h
index afc7aba901..1883a23388 100644
--- a/daemon/src/sip/pattern.h
+++ b/daemon/src/sip/pattern.h
@@ -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;
         }
 
         /**
-- 
GitLab