summaryrefslogtreecommitdiff
path: root/src/common/address_space.h
diff options
context:
space:
mode:
authorGravatar Liam White2022-04-13 21:02:55 +0200
committerGravatar Fernando Sahmkow2022-10-06 21:00:53 +0200
commitafab6c143cb486c7d14f1509cd04049ad08d3a65 (patch)
treefb3a35b23be7dd5b2c502ec550c027760257c6f3 /src/common/address_space.h
parentVideoCore: Implement formats needed for N64 emulation. (diff)
downloadyuzu-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.h10
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 */
23template <typename VaType, VaType UnmappedVa, typename PaType, PaType UnmappedPa, 23template <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>
25requires AddressSpaceValid<VaType, AddressSpaceBits> class FlatAddressSpaceMap { 25requires AddressSpaceValid<VaType, AddressSpaceBits>
26class FlatAddressSpaceMap {
26private: 27private:
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 */
104template <typename VaType, VaType UnmappedVa, size_t AddressSpaceBits> 105template <typename VaType, VaType UnmappedVa, size_t AddressSpaceBits>
105requires AddressSpaceValid<VaType, AddressSpaceBits> class FlatAllocator 106requires AddressSpaceValid<VaType, AddressSpaceBits>
107class FlatAllocator
106 : public FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits> { 108 : public FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits> {
107private: 109private:
108 using Base = FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits>; 110 using Base = FlatAddressSpaceMap<VaType, UnmappedVa, bool, false, false, AddressSpaceBits>;