Browse Source

refactoring

Kajetan Johannes Hammerle 3 years ago
parent
commit
33e0b48713
2 changed files with 10 additions and 14 deletions
  1. 9 11
      utils/HashMap.h
  2. 1 3
      utils/SplitString.h

+ 9 - 11
utils/HashMap.h

@@ -80,6 +80,15 @@ class HashMap final {
         other.clear();
     }
 
+    template<typename H>
+    static int hash(const H& key) {
+        return key.hashCode();
+    }
+
+    static int hash(int key) {
+        return key;
+    }
+
 public:
 
     HashMap() : used(false) {
@@ -191,17 +200,6 @@ public:
         }
         s.append("]");
     }
-
-private:
-
-    template<typename H>
-    static int hash(const H& key) {
-        return key.hashCode();
-    }
-
-    static int hash(int key) {
-        return key;
-    }
 };
 
 #endif

+ 1 - 3
utils/SplitString.h

@@ -50,7 +50,7 @@ class SplitString final {
         }
         return false;
     }
-    
+
     void addEntries() {
         int lastIndex = 0;
         for(int i = 0; i < data.getLength(); i++) {
@@ -77,8 +77,6 @@ public:
     const char* operator[](int index) const {
         return &(data[entries[index]]);
     }
-
-private:
 };
 
 #endif