diff --git a/Source/Client/Session/SessionPredicates.cpp b/Source/Client/Session/SessionPredicates.cpp index fac7bfd04..07592bc83 100644 --- a/Source/Client/Session/SessionPredicates.cpp +++ b/Source/Client/Session/SessionPredicates.cpp @@ -6,9 +6,13 @@ #include "Contents/Actors/Pc.h" #include "Contents/World/World.h" +#include #include #include +template __declspec(noinline) SessionRecord6178Entry* std::allocator::allocate(std::size_t); +template __declspec(noinline) std::vector::~vector() noexcept; + // OFFSET: 0x00E1D6B0 // FUNCTION: fn_23850 int CSession::IsState291To303(int state) const { @@ -34,13 +38,9 @@ int CSession::IsState291To303(int state) const { // OFFSET: 0x00E1D700 // FUNCTION: fn_23851 bool CSession::HasTrackedAchievement(int id) const { - auto it = this->trackedAchievements.begin(); - for (; it != this->trackedAchievements.end(); ++it) { - const SessionRecord6178 record = *it; - if (id == record.id) { - break; - } - } + const auto it = std::find_if(this->trackedAchievements.begin(), this->trackedAchievements.end(), [id](SessionRecord6178 record) { + return id == record.id; + }); return it != this->trackedAchievements.end(); } diff --git a/Source/Linkage/Source/Client/Session/SessionPredicates.cpp.h b/Source/Linkage/Source/Client/Session/SessionPredicates.cpp.h index 9716afad8..4147767db 100644 --- a/Source/Linkage/Source/Client/Session/SessionPredicates.cpp.h +++ b/Source/Linkage/Source/Client/Session/SessionPredicates.cpp.h @@ -2,9 +2,11 @@ #include #include +#include #include using SummonHpTree = std::_Tree, std::allocator>, false>>; extern template std::_Tree_find_result, void*>*> SummonHpTree::_Find_lower_bound(const std::int64_t&) const; +extern template std::string::basic_string(const std::string&);