diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-07 20:45:45 +0200 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-05-07 20:45:45 +0200 |
commit | 4f4d230dac936f32cceb8be35fe09822d85bb2b6 (patch) | |
tree | a180a736708834708e0e5b95fd1720f37722b429 /src/common/common_types.h | |
parent | Merge pull request #695 from Subv/crash_f (diff) | |
parent | Fix printf format warning (diff) | |
download | yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar.gz yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar.bz2 yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar.lz yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar.xz yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.tar.zst yuzu-4f4d230dac936f32cceb8be35fe09822d85bb2b6.zip |
Diffstat (limited to 'src/common/common_types.h')
-rw-r--r-- | src/common/common_types.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/common_types.h b/src/common/common_types.h index 1b453e7f5..644709ba6 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -47,6 +47,11 @@ typedef std::int64_t s64; ///< 64-bit signed int typedef float f32; ///< 32-bit floating point typedef double f64; ///< 64-bit floating point +// TODO: It would be nice to eventually replace these with strong types that prevent accidental +// conversion between each other. +typedef u32 VAddr; ///< Represents a pointer in the userspace virtual address space. +typedef u32 PAddr; ///< Represents a pointer in the ARM11 physical address space. + /// Union for fast 16-bit type casting union t16 { u8 _u8[2]; ///< 8-bit unsigned char(s) @@ -73,6 +78,16 @@ union t64 { u8 _u8[8]; ///< 8-bit unsigned char(s) }; +// An inheritable class to disallow the copy constructor and operator= functions +class NonCopyable { +protected: + NonCopyable() = default; + ~NonCopyable() = default; + + NonCopyable(NonCopyable&) = delete; + NonCopyable& operator=(NonCopyable&) = delete; +}; + namespace Common { /// Rectangle data structure class Rect { |