diff options
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/classcompat.cpp | 2 | ||||
-rw-r--r-- | src/vm/method.hpp | 11 | ||||
-rw-r--r-- | src/vm/methodtablebuilder.cpp | 2 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/vm/classcompat.cpp b/src/vm/classcompat.cpp index 473e328200..b677045f0b 100644 --- a/src/vm/classcompat.cpp +++ b/src/vm/classcompat.cpp @@ -3290,7 +3290,7 @@ HRESULT MethodTableBuilder::FindMethodDeclarationForMethodImpl( if (TypeFromToken(typeref) == mdtMethodDef) { mdTypeDef typeDef; - hr = pMDInternalImport->GetParentToken(typeref, &typeDef); + IfFailRet(pMDInternalImport->GetParentToken(typeref, &typeDef)); // Make sure it is a typedef if (TypeFromToken(typeDef) != mdtTypeDef) diff --git a/src/vm/method.hpp b/src/vm/method.hpp index 68626c7bc4..cf532f8102 100644 --- a/src/vm/method.hpp +++ b/src/vm/method.hpp @@ -210,16 +210,13 @@ class MethodDesc public: - enum - { #ifdef _WIN64 - ALIGNMENT_SHIFT = 3, + static const int ALIGNMENT_SHIFT = 3; #else - ALIGNMENT_SHIFT = 2, + static const int ALIGNMENT_SHIFT = 2; #endif - ALIGNMENT = (1<<ALIGNMENT_SHIFT), - ALIGNMENT_MASK = (ALIGNMENT-1) - }; + static const size_t ALIGNMENT = (1 << ALIGNMENT_SHIFT); + static const size_t ALIGNMENT_MASK = (ALIGNMENT - 1); #ifdef _DEBUG diff --git a/src/vm/methodtablebuilder.cpp b/src/vm/methodtablebuilder.cpp index 609eda0b3f..e8a7e9339f 100644 --- a/src/vm/methodtablebuilder.cpp +++ b/src/vm/methodtablebuilder.cpp @@ -2434,7 +2434,7 @@ HRESULT MethodTableBuilder::FindMethodDeclarationForMethodImpl( if (TypeFromToken(typeref) == mdtMethodDef) { // If parent is a method def then this is a varags method mdTypeDef typeDef; - hr = pMDInternalImport->GetParentToken(typeref, &typeDef); + IfFailRet(pMDInternalImport->GetParentToken(typeref, &typeDef)); if (TypeFromToken(typeDef) != mdtTypeDef) { // A mdtMethodDef must be parented by a mdtTypeDef |