summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2011-09-02 19:23:18 +0000
committerMorgan Deters <mdeters@gmail.com>2011-09-02 19:23:18 +0000
commit74770f1071e6102795393cf65dd0c651038db6b4 (patch)
treee1ae141b4d74bd7a603631830303fe3f1ea439d9
parent487e610b88f2a634e3285886ff96717c103338de (diff)
Ensure that assignment gestures through CDMap iterators like:
(*myCDMap.find(foo)).second = bar; fail with a compile-time error (rather than being silently ignored, like they had been). Resolves bug #276.
-rw-r--r--src/context/cdmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/context/cdmap.h b/src/context/cdmap.h
index 1e7e931da..c71459835 100644
--- a/src/context/cdmap.h
+++ b/src/context/cdmap.h
@@ -514,8 +514,8 @@ public:
}
// Dereference operators.
- std::pair<const Key, Data> operator*() const {
- return std::pair<const Key, Data>(d_it->getKey(), d_it->get());
+ std::pair<const Key, const Data> operator*() const {
+ return std::pair<const Key, const Data>(d_it->getKey(), d_it->get());
}
// Prefix increment
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback