Skip to content

Commit

Permalink
Revert "Try to fix build error on clang 16"
Browse files Browse the repository at this point in the history
This reverts commit 84b23b2.
  • Loading branch information
danielkrupinski committed Oct 28, 2024
1 parent ec8c5b1 commit f8d711f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/MemorySearch/PatternPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PatternPool {
static consteval void copyPatterns(const auto& tempPatternPool, auto& pool, TypeList<SourceTypes...>, TypeList<DestTypes...>) noexcept
{
std::size_t outPatternIndex{0}, outBufferIndex{0};
(copyPattern(TypeList<SourceTypes...>::template indexOf<DestTypes>, outPatternIndex, outBufferIndex, tempPatternPool, pool), ...);
(copyPattern(TypeList<SourceTypes...>::template indexOf<DestTypes>(), outPatternIndex, outBufferIndex, tempPatternPool, pool), ...);
}

static consteval void copyPattern(std::size_t patternIndex, std::size_t& outIndex, std::size_t& outBuffer, const auto& tempPool, auto& pool) noexcept
Expand Down
6 changes: 3 additions & 3 deletions Source/MemorySearch/PatternSearchResults.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ class PatternSearchResults {
{
using UnpackedType = UnpackStrongTypeAliasT<T>;
if constexpr (OneBytePatternTypes::template contains<T>())
return utils::fromBytes<UnpackedType>(oneByteResults[OneBytePatternTypes::template indexOf<T>]);
return utils::fromBytes<UnpackedType>(oneByteResults[OneBytePatternTypes::template indexOf<T>()]);
else if constexpr (FourBytePatternTypes::template contains<T>())
return utils::fromBytes<UnpackedType>(fourByteResults[FourBytePatternTypes::template indexOf<T>]);
return utils::fromBytes<UnpackedType>(fourByteResults[FourBytePatternTypes::template indexOf<T>()]);
else if constexpr (EightBytePatternTypes::template contains<T>())
return utils::fromBytes<UnpackedType>(eightByteResults[EightBytePatternTypes::template indexOf<T>]);
return utils::fromBytes<UnpackedType>(eightByteResults[EightBytePatternTypes::template indexOf<T>()]);
else
static_assert(!std::is_same_v<T, T>, "Unknown type");
}
Expand Down
5 changes: 4 additions & 1 deletion Source/Utils/TypeList.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ struct TypeList {
}

template <typename T>
static constexpr std::size_t indexOf = utils::typeIndex<T, std::tuple<Types...>>();
static constexpr std::size_t indexOf() noexcept
{
return utils::typeIndex<T, std::tuple<Types...>>();
}

template <typename T>
static constexpr bool contains() noexcept
Expand Down

0 comments on commit f8d711f

Please sign in to comment.