summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/ha/ReplicationTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/ha/ReplicationTest.cpp')
-rw-r--r--cpp/src/qpid/ha/ReplicationTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/ha/ReplicationTest.cpp b/cpp/src/qpid/ha/ReplicationTest.cpp
index 613ac0a8c6..18e0953930 100644
--- a/cpp/src/qpid/ha/ReplicationTest.cpp
+++ b/cpp/src/qpid/ha/ReplicationTest.cpp
@@ -28,9 +28,9 @@ namespace ha {
using types::Variant;
ReplicateLevel ReplicationTest::replicateLevel(const std::string& str) {
- Enum<ReplicateLevel> rl;
- if (rl.parseNoThrow(str)) return ReplicateLevel(rl.get());
- else return replicateDefault;
+ Enum<ReplicateLevel> rl(replicateDefault);
+ if (!str.empty()) rl.parse(str);
+ return rl.get();
}
ReplicateLevel ReplicationTest::replicateLevel(const framing::FieldTable& f) {