Skip to content

Commit

Permalink
Mark non-modifying map functions as const
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and coelckers committed Jan 21, 2023
1 parent decba68 commit 698bd25
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions wadsrc/static/zscript/engine/maps.zs
Expand Up @@ -5,13 +5,13 @@ struct Map_I32_I8 native
native void Move(Map_I32_I8 other);
native void Swap(Map_I32_I8 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") int GetIfExists(int key);
native version("4.11") int CheckValue(int key, out bool exists);
native version("4.11") int GetIfExists(int key) const;
native version("4.11") int CheckValue(int key, out bool exists) const;

native void Insert(int key, int value);
native void InsertNew(int key);
Expand All @@ -37,13 +37,13 @@ struct Map_I32_I16 native
native void Move(Map_I32_I16 other);
native void Swap(Map_I32_I16 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") int GetIfExists(int key);
native version("4.11") int CheckValue(int key, out bool exists);
native version("4.11") int GetIfExists(int key) const;
native version("4.11") int CheckValue(int key, out bool exists) const;

native void Insert(int key, int value);
native void InsertNew(int key);
Expand All @@ -69,13 +69,13 @@ struct Map_I32_I32 native
native void Move(Map_I32_I32 other);
native void Swap(Map_I32_I32 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") int GetIfExists(int key);
native version("4.11") int CheckValue(int key, out bool exists);
native version("4.11") int GetIfExists(int key) const;
native version("4.11") int CheckValue(int key, out bool exists) const;

native void Insert(int key, int value);
native void InsertNew(int key);
Expand All @@ -101,13 +101,13 @@ struct Map_I32_F32 native
native void Move(Map_I32_F32 other);
native void Swap(Map_I32_F32 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native double Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") double GetIfExists(int key);
native version("4.11") double CheckValue(int key, out bool exists);
native version("4.11") double GetIfExists(int key) const;
native version("4.11") double CheckValue(int key, out bool exists) const;

native void Insert(int key, double value);
native void InsertNew(int key);
Expand All @@ -133,13 +133,13 @@ struct Map_I32_F64 native
native void Move(Map_I32_F64 other);
native void Swap(Map_I32_F64 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native double Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") double GetIfExists(int key);
native version("4.11") double CheckValue(int key, out bool exists);
native version("4.11") double GetIfExists(int key) const;
native version("4.11") double CheckValue(int key, out bool exists) const;

native void Insert(int key, double value);
native void InsertNew(int key);
Expand All @@ -165,13 +165,13 @@ struct Map_I32_Obj native
native void Move(Map_I32_Obj other);
native void Swap(Map_I32_Obj other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native Object Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") Object GetIfExists(int key);
native version("4.11") Object CheckValue(int key, out bool exists);
native version("4.11") Object GetIfExists(int key) const;
native version("4.11") Object CheckValue(int key, out bool exists) const;

native void Insert(int key, Object value);
native void InsertNew(int key);
Expand All @@ -197,13 +197,13 @@ struct Map_I32_Ptr native
native void Move(Map_I32_Ptr other);
native void Swap(Map_I32_Ptr other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native voidptr Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") voidptr GetIfExists(int key);
native version("4.11") voidptr CheckValue(int key, out bool exists);
native version("4.11") voidptr GetIfExists(int key) const;
native version("4.11") voidptr CheckValue(int key, out bool exists) const;

native void Insert(int key, voidptr value);
native void InsertNew(int key);
Expand All @@ -226,13 +226,13 @@ struct Map_I32_Str native
native void Move(Map_I32_Str other);
native void Swap(Map_I32_Str other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native String Get(int key);
native bool CheckKey(int key);
native bool CheckKey(int key) const;

native version("4.11") String GetIfExists(int key);
native version("4.11") String CheckValue(int key, out bool exists);
native version("4.11") String GetIfExists(int key) const;
native version("4.11") String CheckValue(int key, out bool exists) const;

native void Insert(int key, String value);
native void InsertNew(int key);
Expand Down Expand Up @@ -260,13 +260,13 @@ struct Map_Str_I8 native
native void Move(Map_Str_I8 other);
native void Swap(Map_Str_I8 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") int GetIfExists(String key);
native version("4.11") int CheckValue(String key, out bool exists);
native version("4.11") int GetIfExists(String key) const;
native version("4.11") int CheckValue(String key, out bool exists) const;

native void Insert(String key, int value);
native void InsertNew(String key);
Expand All @@ -292,13 +292,13 @@ struct Map_Str_I16 native
native void Move(Map_Str_I16 other);
native void Swap(Map_Str_I16 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") int GetIfExists(String key);
native version("4.11") int CheckValue(String key, out bool exists);
native version("4.11") int GetIfExists(String key) const;
native version("4.11") int CheckValue(String key, out bool exists) const;

native void Insert(String key, int value);
native void InsertNew(String key);
Expand All @@ -324,13 +324,13 @@ struct Map_Str_I32 native
native void Move(Map_Str_I32 other);
native void Swap(Map_Str_I32 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native int Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") int GetIfExists(String key);
native version("4.11") int CheckValue(String key, out bool exists);
native version("4.11") int GetIfExists(String key) const;
native version("4.11") int CheckValue(String key, out bool exists) const;

native void Insert(String key, int value);
native void InsertNew(String key);
Expand All @@ -356,13 +356,13 @@ struct Map_Str_F32 native
native void Move(Map_Str_F32 other);
native void Swap(Map_Str_F32 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native double Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") double GetIfExists(String key);
native version("4.11") double CheckValue(String key, out bool exists);
native version("4.11") double GetIfExists(String key) const;
native version("4.11") double CheckValue(String key, out bool exists) const;

native void Insert(String key, double value);
native void InsertNew(String key);
Expand All @@ -388,13 +388,13 @@ struct Map_Str_F64 native
native void Move(Map_Str_F64 other);
native void Swap(Map_Str_F64 other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native double Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") double GetIfExists(String key);
native version("4.11") double CheckValue(String key, out bool exists);
native version("4.11") double GetIfExists(String key) const;
native version("4.11") double CheckValue(String key, out bool exists) const;

native void Insert(String key, double value);
native void InsertNew(String key);
Expand All @@ -420,13 +420,13 @@ struct Map_Str_Obj native
native void Move(Map_Str_Obj other);
native void Swap(Map_Str_Obj other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native Object Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") Object GetIfExists(String key);
native version("4.11") Object CheckValue(String key, out bool exists);
native version("4.11") Object GetIfExists(String key) const;
native version("4.11") Object CheckValue(String key, out bool exists) const;

native void Insert(String key, Object value);
native void InsertNew(String key);
Expand All @@ -452,13 +452,13 @@ struct Map_Str_Ptr native
native void Move(Map_Str_Ptr other);
native void Swap(Map_Str_Ptr other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native voidptr Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") voidptr GetIfExists(String key);
native version("4.11") voidptr CheckValue(String key, out bool exists);
native version("4.11") voidptr GetIfExists(String key) const;
native version("4.11") voidptr CheckValue(String key, out bool exists) const;

native void Insert(String key, voidptr value);
native void InsertNew(String key);
Expand All @@ -484,13 +484,13 @@ struct Map_Str_Str native
native void Move(Map_Str_Str other);
native void Swap(Map_Str_Str other);
native void Clear();
native uint CountUsed();
native uint CountUsed() const;

native String Get(String key);
native bool CheckKey(String key);
native bool CheckKey(String key) const;

native version("4.11") String GetIfExists(String key);
native version("4.11") String CheckValue(String key, out bool exists);
native version("4.11") String GetIfExists(String key) const;
native version("4.11") String CheckValue(String key, out bool exists) const;

native void Insert(String key, String value);
native void InsertNew(String key);
Expand Down

0 comments on commit 698bd25

Please sign in to comment.