summaryrefslogtreecommitdiff
path: root/cpp/src/tests/Selector.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-03-06 20:24:23 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-03-06 20:24:23 +0000
commitd123344ad66cd04c330e784394581d4c2c81ec89 (patch)
tree055936780e1f2f3b93032019c69ac5eb597cfc45 /cpp/src/tests/Selector.cpp
parent14a76ddf42f48b809eec4db1658bc63f253d103a (diff)
downloadqpid-python-d123344ad66cd04c330e784394581d4c2c81ec89.tar.gz
QPID-4558: Selectors for C++ broker
- Changed unit test code that relied on non C++03 feature Windows compiler spotted this problem. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1453536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/Selector.cpp')
-rw-r--r--cpp/src/tests/Selector.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/cpp/src/tests/Selector.cpp b/cpp/src/tests/Selector.cpp
index 932653e11c..1c15abf509 100644
--- a/cpp/src/tests/Selector.cpp
+++ b/cpp/src/tests/Selector.cpp
@@ -185,16 +185,12 @@ QPID_AUTO_TEST_CASE(parseStringFail)
}
class TestSelectorEnv : public qpid::broker::SelectorEnv {
- map<string, qb::Value> values;
+ mutable map<string, qb::Value> values;
boost::ptr_vector<string> strings;
static const qb::Value EMPTY;
- bool present(const string& v) const {
- return values.find(v)!=values.end();
- }
-
const qb::Value& value(const string& v) const {
- const qb::Value& r = present(v) ? values.at(v) : EMPTY;
+ const qb::Value& r = values.find(v)!=values.end() ? values[v] : EMPTY;
return r;
}