diff --git a/BeefySysLib/util/SizedArray.h b/BeefySysLib/util/SizedArray.h index 95da8999..89a6fef8 100644 --- a/BeefySysLib/util/SizedArray.h +++ b/BeefySysLib/util/SizedArray.h @@ -113,6 +113,16 @@ public: { return mPtr < val2.mPtr; } + + bool operator>(const iterator& val2) + { + return mPtr > val2.mPtr; + } + + bool operator>=(const iterator& val2) + { + return mPtr >= val2.mPtr; + } }; struct const_iterator diff --git a/BeefySysLib/util/String.cpp b/BeefySysLib/util/String.cpp index 3c0f2a23..43c759fe 100644 --- a/BeefySysLib/util/String.cpp +++ b/BeefySysLib/util/String.cpp @@ -123,7 +123,7 @@ intptr StringView::LastIndexOf(char c) const return -1; } -intptr StringView::LastIndexOf(char c, intptr startCheck) const +intptr StringView::LastIndexOf(char c, int startCheck) const { auto ptr = mPtr; for (intptr i = startCheck; i >= 0; i--) @@ -132,6 +132,15 @@ intptr StringView::LastIndexOf(char c, intptr startCheck) const return -1; } +intptr StringView::LastIndexOf(char c, int64 startCheck) const +{ + auto ptr = mPtr; + for (intptr i = (intptr)startCheck; i >= 0; i--) + if (ptr[i] == c) + return i; + return -1; +} + String StringView::ToString() const { return String(this->mPtr, this->mLength); diff --git a/IDEHelper/Compiler/BfIRBuilder.cpp b/IDEHelper/Compiler/BfIRBuilder.cpp index 37c726d6..c18cfea7 100644 --- a/IDEHelper/Compiler/BfIRBuilder.cpp +++ b/IDEHelper/Compiler/BfIRBuilder.cpp @@ -1831,7 +1831,7 @@ void BfIRBuilder::Write(const BfIRTypeData& type) { auto sizedArrayType = (BfConstantSizedArrayType*)GetConstantById(type.mId); Write(sizedArrayType->mType); - WriteSLEB128(sizedArrayType->mLength); + WriteSLEB128((int64)sizedArrayType->mLength); } else if (type.mKind != BfIRTypeData::TypeKind_None) WriteSLEB128(type.mId); diff --git a/IDEHelper/Compiler/BfSystem.h b/IDEHelper/Compiler/BfSystem.h index e553aaff..cdda7b5c 100644 --- a/IDEHelper/Compiler/BfSystem.h +++ b/IDEHelper/Compiler/BfSystem.h @@ -410,6 +410,8 @@ struct BfCodeGenOptions HashContext hashCtx; hashCtx.Mixin(mWriteObj); + hashCtx.Mixin(mWriteBitcode); + hashCtx.Mixin(mAsmKind); hashCtx.Mixin(mWriteToLib); hashCtx.Mixin(mWriteLLVMIR); hashCtx.Mixin(mVirtualMethodOfs);