diff options
| author | 2022-04-13 21:02:55 +0200 | |
|---|---|---|
| committer | 2022-10-06 21:00:53 +0200 | |
| commit | afab6c143cb486c7d14f1509cd04049ad08d3a65 (patch) | |
| tree | fb3a35b23be7dd5b2c502ec550c027760257c6f3 /src/common/address_space.h | |
| parent | VideoCore: Implement formats needed for N64 emulation. (diff) | |
| download | yuzu-afab6c143cb486c7d14f1509cd04049ad08d3a65.tar.gz yuzu-afab6c143cb486c7d14f1509cd04049ad08d3a65.tar.xz yuzu-afab6c143cb486c7d14f1509cd04049ad08d3a65.zip | |
General: Fix compilation for GCC
Diffstat (limited to 'src/common/address_space.h')
| -rw-r--r-- | src/common/address_space.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/address_space.h b/src/common/address_space.h index fd2f32b7d..8e13935af 100644 --- a/src/common/address_space.h +++ b/src/common/address_space.h | |||
| @@ -22,7 +22,8 @@ struct EmptyStruct {}; | |||
| 22 | */ | 22 | */ |
| 23 | template <typename VaType, VaType UnmappedVa, typename PaType, PaType UnmappedPa, | 23 | template <typename VaType, VaType UnmappedVa, typename PaType, PaType UnmappedPa, |
| 24 | bool PaContigSplit, size_t AddressSpaceBits, typename ExtraBlockInfo = EmptyStruct> | 24 | bool PaContigSplit, size_t AddressSpaceBits, typename ExtraBlockInfo = EmptyStruct> |
| 25 | requires AddressSpaceValid<VaType, AddressSpaceBits> class FlatAddressSpaceMap { | 25 | requires AddressSpaceValid<VaType, AddressSpaceBits> |
| 26 | class FlatAddressSpaceMap { | ||
| 26 | private: | 27 | private: |
| 27 | std::function<void(VaType, VaType)> | 28 | std::function<void(VaType, VaType)> |
| 28 | unmapCallback{}; //!< Callback called when the mappings in an region have changed | 29 | unmapCallback{}; //!< Callback called when the mappings in an region have changed |
| @@ -40,8 +41,8 @@ protected: | |||
| 40 | 41 | ||
| 41 | Block() = default; | 42 | Block() = default; |
| 42 | 43 | ||
| 43 | Block(VaType virt, PaType phys, ExtraBlockInfo extraInfo) | 44 | Block(VaType virt_, PaType phys_, ExtraBlockInfo extraInfo_) |
| 44 | : virt(virt), phys(phys), extraInfo(extraInfo) {} | 45 | : virt(virt_), phys(phys_), extraInfo(extraInfo_) {} |
| 45 | 46 | ||
| 46 | constexpr bool Valid() { | 47 | constexpr bool Valid() { |
| 47 | return virt != UnmappedVa; | 48 | return virt != UnmappedVa; |
| @@ -102,7 +103,8 @@ public: | |||
| 102 | * initial, fast linear pass and a subsequent slower pass that iterates until it finds a free block | 103 | * initial, fast linear pass and a subsequent slower pass that iterates until it finds a free block |
| 103 | */ | 104 | */ |
| 104 | template <typename VaType, VaType UnmappedVa, size_t AddressSpaceBits> | 105 | template <typename VaType, VaType UnmappedVa, size_t AddressSpaceBits> |
| 105 | requires AddressSpaceValid<VaType, AddressSpaceBits> class FlatAllocator | 106 | requires AddressSpaceValid<VaType, AddressSpaceBits> |
| 107 | class FlatAllocator | ||
| 106 | : public FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits> { | 108 | : public FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits> { |
| 107 | private: | 109 | private: |
| 108 | using Base = FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits>; | 110 | using Base = FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits>; |