]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/mgr/QueryParams.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / QueryParams.cc
index 3a0426b647ef928941629055c1eba49b0c031699..96bca8ae0955c29aa8277394c69d15ffd994c3ce 100644 (file)
@@ -1,24 +1,25 @@
 /*
- * $Id$
- *
- * DEBUG: section 16    Cache Manager API
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
  *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
-#include "config.h"
+/* DEBUG: section 16    Cache Manager API */
+
+#include "squid.h"
 #include "base/TextException.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/IntParam.h"
-#include "mgr/StringParam.h"
 #include "mgr/QueryParams.h"
-#include <regex.h>
-
+#include "mgr/StringParam.h"
 
 Mgr::QueryParam::Pointer
-Mgr::QueryParams::get(const String& name)
+Mgr::QueryParams::get(const String& name) const
 {
     Must(name.size() != 0);
-    Params::iterator pos = find(name);
+    Params::const_iterator pos = find(name);
     return (pos == params.end() ? NULL : pos->second);
 }
 
@@ -52,11 +53,11 @@ Mgr::QueryParams::unpack(const Ipc::TypedMsgHdr& msg)
     }
 }
 
-Mgr::QueryParams::Params::iterator
-Mgr::QueryParams::find(const String& name)
+Mgr::QueryParams::Params::const_iterator
+Mgr::QueryParams::find(const String& name) const
 {
     Must(name.size() != 0);
-    Params::iterator iter = params.begin();
+    Params::const_iterator iter = params.begin();
     for ( ; iter != params.end(); ++iter) {
         if (name.caseCmp(iter->first) == 0)
             break;
@@ -124,7 +125,7 @@ Mgr::QueryParams::Parse(const String& aParamsStr, QueryParams& aParams)
 Mgr::QueryParam::Pointer
 Mgr::QueryParams::CreateParam(QueryParam::Type aType)
 {
-    switch(aType) {
+    switch (aType) {
     case QueryParam::ptInt:
         return new IntParam();
 
@@ -137,3 +138,4 @@ Mgr::QueryParams::CreateParam(QueryParam::Type aType)
     }
     return NULL;
 }
+