Skip to content

Commit a8c1913

Browse files
committed
Use brace init in VMSymbol
Signed-off-by: Stefan Marr <[email protected]>
1 parent ebe195a commit a8c1913

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/vmobjects/VMSymbol.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ VMSymbol::VMSymbol(const size_t length, const char* const str)
5050
for (; i < length; ++i) {
5151
chars[i] = str[i];
5252
}
53-
// clear caching fields
54-
memset(&cachedClass_invokable, 0, 6 * sizeof(void*) + 1 * sizeof(long));
5553
}
5654

5755
size_t VMSymbol::GetObjectSize() const {

src/vmobjects/VMSymbol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class VMSymbol : public VMString {
4747

4848
private:
4949
const int numberOfArgumentsOfSignature;
50-
GCClass* cachedClass_invokable[3];
50+
GCClass* cachedClass_invokable[3]{};
5151
long nextCachePos;
52-
GCInvokable* cachedInvokable[3];
52+
GCInvokable* cachedInvokable[3]{};
5353

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

0 commit comments

Comments
 (0)