summaryrefslogtreecommitdiff
path: root/klm/util/key_value_packing.hh
diff options
context:
space:
mode:
Diffstat (limited to 'klm/util/key_value_packing.hh')
-rw-r--r--klm/util/key_value_packing.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/klm/util/key_value_packing.hh b/klm/util/key_value_packing.hh
index 450512ac..b84a5aad 100644
--- a/klm/util/key_value_packing.hh
+++ b/klm/util/key_value_packing.hh
@@ -18,6 +18,8 @@ template <class Key, class Value> struct Entry {
const Key &GetKey() const { return key; }
const Value &GetValue() const { return value; }
+ Value &MutableValue() { return value; }
+
void Set(const Key &key_in, const Value &value_in) {
SetKey(key_in);
SetValue(value_in);
@@ -77,6 +79,8 @@ template <class KeyT, class ValueT> class ByteAlignedPacking {
const Key &GetKey() const { return key; }
const Value &GetValue() const { return value; }
+ Value &MutableValue() { return value; }
+
void Set(const Key &key_in, const Value &value_in) {
SetKey(key_in);
SetValue(value_in);