]> granicus.if.org Git - icinga2/blobdiff - lib/livestatus/attributefilter.cpp
Merge branch 'support/2.8'
[icinga2] / lib / livestatus / attributefilter.cpp
index e825520278df7b5468e98bf7cbdd98837c911bd4..35ed40cf7acb7f7a93f5b0527c315d6974e35c01 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  * Icinga 2                                                                   *
- * Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)  *
+ * Copyright (C) 2012-2018 Icinga Development Team (https://www.icinga.com/)  *
  *                                                                            *
  * This program is free software; you can redistribute it and/or              *
  * modify it under the terms of the GNU General Public License                *
@@ -27,8 +27,8 @@
 
 using namespace icinga;
 
-AttributeFilter::AttributeFilter(const String& column, const String& op, const String& operand)
-       : m_Column(column), m_Operator(op), m_Operand(operand)
+AttributeFilter::AttributeFilter(String column, String op, String operand)
+       : m_Column(std::move(column)), m_Operator(std::move(op)), m_Operand(std::move(operand))
 { }
 
 bool AttributeFilter::Apply(const Table::Ptr& table, const Value& row)
@@ -70,7 +70,7 @@ bool AttributeFilter::Apply(const Table::Ptr& table, const Value& row)
                                ret = boost::regex_search(operand.GetData(), what, expr);
                        } catch (boost::exception&) {
                                Log(LogWarning, "AttributeFilter")
-                                   << "Regex '" << m_Operand << " " << m_Operator << " " << value << "' error.";
+                                       << "Regex '" << m_Operand << " " << m_Operator << " " << value << "' error.";
                                ret = false;
                        }
 
@@ -86,7 +86,7 @@ bool AttributeFilter::Apply(const Table::Ptr& table, const Value& row)
                                ret = boost::iequals(operand, m_Operand.GetData());
                        } catch (boost::exception&) {
                                Log(LogWarning, "AttributeFilter")
-                                   << "Case-insensitive equality '" << m_Operand << " " << m_Operator << " " << value << "' error.";
+                                       << "Case-insensitive equality '" << m_Operand << " " << m_Operator << " " << value << "' error.";
                                ret = false;
                        }
 
@@ -100,7 +100,7 @@ bool AttributeFilter::Apply(const Table::Ptr& table, const Value& row)
                                ret = boost::regex_search(operand.GetData(), what, expr);
                        } catch (boost::exception&) {
                                Log(LogWarning, "AttributeFilter")
-                                   << "Regex '" << m_Operand << " " << m_Operator << " " << value << "' error.";
+                                       << "Regex '" << m_Operand << " " << m_Operator << " " << value << "' error.";
                                ret = false;
                        }