summaryrefslogtreecommitdiff
path: root/src/keymap_manager.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-09 13:48:41 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-09 13:54:09 +0000
commit1cec8df45e297a8136df6f293d4874ae6c6cb013 (patch)
tree7d713ba554765093238c924bcc9a6eaf7bf240ec /src/keymap_manager.hh
parent44f81d0b8b73367369de6be0757247a62876d4c1 (diff)
ArrayView content is not const anymore
As in upcoming std c++ array_view, ArrayView<T> points to mutable data, use ArrayView<const T> or alias ConstArrayView<T> for const data.
Diffstat (limited to 'src/keymap_manager.hh')
-rw-r--r--src/keymap_manager.hh5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/keymap_manager.hh b/src/keymap_manager.hh
index dd05c176..855290d5 100644
--- a/src/keymap_manager.hh
+++ b/src/keymap_manager.hh
@@ -1,6 +1,7 @@
#ifndef keymap_manager_hh_INCLUDED
#define keymap_manager_hh_INCLUDED
+#include "array_view.hh"
#include "keys.hh"
#include "hash.hh"
#include "unordered_map.hh"
@@ -21,8 +22,6 @@ enum class KeymapMode : int
User,
};
-template<typename T> class ArrayView;
-
class KeymapManager
{
public:
@@ -33,7 +32,7 @@ public:
void unmap_key(Key key, KeymapMode mode);
bool is_mapped(Key key, KeymapMode mode) const;
- ArrayView<Key> get_mapping(Key key, KeymapMode mode) const;
+ ConstArrayView<Key> get_mapping(Key key, KeymapMode mode) const;
private:
KeymapManager()
: m_parent(nullptr) {}