yuzu/src/core/hle
Lioncash 0a0b3c4b9f ipc_helpers: Add PushEnum() member function to ResponseBuilder
Allows pushing strongly-typed enum members without the need to always
cast them at the call sites.

Note that we *only* allow strongly-typed enums in this case. The reason
for this is that strongly typed enums have a guaranteed defined size, so
the size of the data being pushed is always deterministic. With regular
enums this can be a little more error-prone, so we disallow them.

This function simply uses the underlying type of the enum to determine
the size of the data. For example, if an enum is defined as:

enum class SomeEnum : u16 {
  SomeEntry
};

if PushEnum(SomeEnum::SomeEntry); is called, then it will push a
u16-size amount of data.
2018-07-20 15:00:58 -04:00
..
kernel thread: Convert ThreadStatus into an enum class 2018-07-19 22:08:56 -04:00
service Merge pull request #740 from Subv/acc_crash 2018-07-20 09:47:47 -07:00
config_mem.cpp Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
config_mem.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
ipc_helpers.h ipc_helpers: Add PushEnum() member function to ResponseBuilder 2018-07-20 15:00:58 -04:00
ipc.h add IPC CommandType & Some HID FunctionInfo (#487) 2018-05-30 14:09:21 -04:00
lock.cpp Fix build on macOS and linux 2018-01-13 22:38:52 +00:00
lock.h Use recursive_mutex instead of mutex to fix #2902 2017-08-29 20:39:55 +12:00
result.h Add & correct some error modules 2018-05-23 14:22:42 +02:00
romfs.cpp apt: load shared font from system archive 2017-06-26 01:38:12 +03:00
romfs.h apt: load shared font from system archive 2017-06-26 01:38:12 +03:00
shared_page.cpp core_timing: Namespace all functions and constants in core_timing's header 2018-04-30 03:32:59 -04:00
shared_page.h Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00