summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/MetricsAdminI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/MetricsAdminI.cpp')
-rw-r--r--cpp/src/Ice/MetricsAdminI.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp
index d6020d3940c..a80e1a7c3ab 100644
--- a/cpp/src/Ice/MetricsAdminI.cpp
+++ b/cpp/src/Ice/MetricsAdminI.cpp
@@ -80,7 +80,7 @@ parseRule(const PropertiesPtr& properties, const string& name)
{
try
{
- regexps.push_back(new MetricsMapI::RegExp(p->first.substr(name.length() + 1), p->second));
+ regexps.push_back(ICE_MAKE_SHARED(MetricsMapI::RegExp, p->first.substr(name.length() + 1), p->second));
}
catch(const std::exception&)
{
@@ -99,7 +99,7 @@ MetricsMapI::RegExp::RegExp(const string& attribute, const string& regexp) : _at
// No regexp support with MinGW, when MinGW C++11 mode is not experimental
// we can use std::regex.
//
-#elif !defined(ICE_CPP11_REGEXP)
+#elif !defined(ICE_CPP11_COMPILER_REGEXP)
if(regcomp(&_preg, regexp.c_str(), REG_EXTENDED | REG_NOSUB) != 0)
{
throw SyscallException(__FILE__, __LINE__);
@@ -120,7 +120,7 @@ MetricsMapI::RegExp::~RegExp()
// No regexp support with MinGW, when MinGW C++11 mode is not experimental
// we can use std::regex.
//
-#elif !defined(ICE_CPP11_REGEXP)
+#elif !defined(ICE_CPP11_COMPILER_REGEXP)
regfree(&_preg);
#endif
}
@@ -134,7 +134,7 @@ MetricsMapI::RegExp::match(const string& value)
// we can use std::regex.
//
return false;
-#elif !defined(ICE_CPP11_REGEXP)
+#elif !defined(ICE_CPP11_COMPILER_REGEXP)
return regexec(&_preg, value.c_str(), 0, 0, 0) == 0;
#else
# if _MSC_VER < 1600
@@ -439,7 +439,7 @@ MetricsAdminI::updateViews()
map<string, MetricsViewIPtr>::const_iterator q = _views.find(viewName);
if(q == _views.end())
{
- q = views.insert(map<string, MetricsViewIPtr>::value_type(viewName, new MetricsViewI(viewName))).first;
+ q = views.insert(map<string, MetricsViewIPtr>::value_type(viewName, ICE_MAKE_SHARED(MetricsViewI, viewName))).first;
}
else
{