Skip to content

Commit

Permalink
Use brace init in VMSymbol
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Marr <[email protected]>
  • Loading branch information
smarr committed Aug 16, 2024
1 parent ebe195a commit a8c1913
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/vmobjects/VMSymbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ VMSymbol::VMSymbol(const size_t length, const char* const str)
for (; i < length; ++i) {
chars[i] = str[i];
}
// clear caching fields
memset(&cachedClass_invokable, 0, 6 * sizeof(void*) + 1 * sizeof(long));
}

size_t VMSymbol::GetObjectSize() const {
Expand Down
4 changes: 2 additions & 2 deletions src/vmobjects/VMSymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class VMSymbol : public VMString {

private:
const int numberOfArgumentsOfSignature;
GCClass* cachedClass_invokable[3];
GCClass* cachedClass_invokable[3]{};
long nextCachePos;
GCInvokable* cachedInvokable[3];
GCInvokable* cachedInvokable[3]{};

inline VMInvokable* GetCachedInvokable(const VMClass* cls) const {
if (cls == load_ptr(cachedClass_invokable[0])) {
Expand Down

0 comments on commit a8c1913

Please sign in to comment.