Ver Fonte

Stricter const

Kajetan Johannes Hammerle há 3 meses atrás
pai
commit
48c7073245
1 ficheiros alterados com 4 adições e 2 exclusões
  1. 4 2
      include/core/HashMap.h

+ 4 - 2
include/core/HashMap.h

@@ -48,8 +48,10 @@ size_t roundUp2(size_t n);
     void initHashMapIterator##N(HashMapIterator##N* mi, const HashMap##N* m);  \
     bool hasNextHashMapNode##N(HashMapIterator##N* mi);                        \
     HashMapNode##N* nextHashMapNode##N(HashMapIterator##N* mi);                \
-    typedef size_t (*ToStringKey##N)(const K* data, char* buffer, size_t n);   \
-    typedef size_t (*ToStringValue##N)(const V* data, char* buffer, size_t n); \
+    typedef size_t (*ToStringKey##N)(K const* const data, char* buffer,        \
+                                     size_t n);                                \
+    typedef size_t (*ToStringValue##N)(V const* const data, char* buffer,      \
+                                       size_t n);                              \
     size_t toStringHashMap##N(const HashMap##N* m, char* buffer, size_t n,     \
                               ToStringKey##N keyString,                        \
                               ToStringValue##N valueString);