2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

hle/service: Make constructors explicit where applicable

Prevents implicit construction and makes these lingering non-explicit
constructors consistent with the rest of the other classes in services.
This commit is contained in:
Lioncash 2018-07-19 12:05:48 -04:00
parent 758c357868
commit c061c2bf3c
22 changed files with 25 additions and 25 deletions

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void GetUserExistence(Kernel::HLERequestContext& ctx); void GetUserExistence(Kernel::HLERequestContext& ctx);
void ListAllUsers(Kernel::HLERequestContext& ctx); void ListAllUsers(Kernel::HLERequestContext& ctx);

View file

@ -72,7 +72,7 @@ public:
class ISelfController final : public ServiceFramework<ISelfController> { class ISelfController final : public ServiceFramework<ISelfController> {
public: public:
ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger); explicit ISelfController(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
private: private:
void SetFocusHandlingMode(Kernel::HLERequestContext& ctx); void SetFocusHandlingMode(Kernel::HLERequestContext& ctx);

View file

@ -12,7 +12,7 @@ namespace Service::AM {
class ILibraryAppletProxy final : public ServiceFramework<ILibraryAppletProxy> { class ILibraryAppletProxy final : public ServiceFramework<ILibraryAppletProxy> {
public: public:
ILibraryAppletProxy(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) explicit ILibraryAppletProxy(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
: ServiceFramework("ILibraryAppletProxy"), nvflinger(std::move(nvflinger)) { : ServiceFramework("ILibraryAppletProxy"), nvflinger(std::move(nvflinger)) {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {0, &ILibraryAppletProxy::GetCommonStateGetter, "GetCommonStateGetter"},

View file

@ -17,7 +17,7 @@ namespace AM {
class AppletAE final : public ServiceFramework<AppletAE> { class AppletAE final : public ServiceFramework<AppletAE> {
public: public:
AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger); explicit AppletAE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
~AppletAE() = default; ~AppletAE() = default;
private: private:

View file

@ -12,7 +12,7 @@ namespace Service::AM {
class IApplicationProxy final : public ServiceFramework<IApplicationProxy> { class IApplicationProxy final : public ServiceFramework<IApplicationProxy> {
public: public:
IApplicationProxy(std::shared_ptr<NVFlinger::NVFlinger> nvflinger) explicit IApplicationProxy(std::shared_ptr<NVFlinger::NVFlinger> nvflinger)
: ServiceFramework("IApplicationProxy"), nvflinger(std::move(nvflinger)) { : ServiceFramework("IApplicationProxy"), nvflinger(std::move(nvflinger)) {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"}, {0, &IApplicationProxy::GetCommonStateGetter, "GetCommonStateGetter"},

View file

@ -17,7 +17,7 @@ namespace AM {
class AppletOE final : public ServiceFramework<AppletOE> { class AppletOE final : public ServiceFramework<AppletOE> {
public: public:
AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger); explicit AppletOE(std::shared_ptr<NVFlinger::NVFlinger> nvflinger);
~AppletOE() = default; ~AppletOE() = default;
private: private:

View file

@ -10,7 +10,7 @@ namespace Service::APM {
class APM final : public ServiceFramework<APM> { class APM final : public ServiceFramework<APM> {
public: public:
APM(std::shared_ptr<Module> apm, const char* name); explicit APM(std::shared_ptr<Module> apm, const char* name);
~APM() = default; ~APM() = default;
private: private:

View file

@ -17,7 +17,7 @@ constexpr u64 audio_ticks{static_cast<u64>(CoreTiming::BASE_CLOCK_RATE / 200)};
class IAudioRenderer final : public ServiceFramework<IAudioRenderer> { class IAudioRenderer final : public ServiceFramework<IAudioRenderer> {
public: public:
IAudioRenderer(AudioRendererParameter audren_params) explicit IAudioRenderer(AudioRendererParameter audren_params)
: ServiceFramework("IAudioRenderer"), worker_params(audren_params) { : ServiceFramework("IAudioRenderer"), worker_params(audren_params) {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetAudioRendererSampleRate"}, {0, nullptr, "GetAudioRendererSampleRate"},
@ -176,7 +176,7 @@ private:
struct UpdateDataHeader { struct UpdateDataHeader {
UpdateDataHeader() {} UpdateDataHeader() {}
UpdateDataHeader(const AudioRendererParameter& config) { explicit UpdateDataHeader(const AudioRendererParameter& config) {
revision = Common::MakeMagic('R', 'E', 'V', '4'); // 5.1.0 Revision revision = Common::MakeMagic('R', 'E', 'V', '4'); // 5.1.0 Revision
behavior_size = 0xb0; behavior_size = 0xb0;
memory_pools_size = (config.effect_count + (config.voice_count * 4)) * 0x10; memory_pools_size = (config.effect_count + (config.voice_count * 4)) * 0x10;

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateBcatService(Kernel::HLERequestContext& ctx); void CreateBcatService(Kernel::HLERequestContext& ctx);

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx); void ThrowFatalWithPolicy(Kernel::HLERequestContext& ctx);
void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx); void ThrowFatalWithCpuContext(Kernel::HLERequestContext& ctx);

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateFriendService(Kernel::HLERequestContext& ctx); void CreateFriendService(Kernel::HLERequestContext& ctx);

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateUserInterface(Kernel::HLERequestContext& ctx); void CreateUserInterface(Kernel::HLERequestContext& ctx);

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx); void CreateGeneralServiceOld(Kernel::HLERequestContext& ctx);
void CreateGeneralService(Kernel::HLERequestContext& ctx); void CreateGeneralService(Kernel::HLERequestContext& ctx);

View file

@ -17,7 +17,7 @@ class nvmap;
class nvdisp_disp0 final : public nvdevice { class nvdisp_disp0 final : public nvdevice {
public: public:
nvdisp_disp0(std::shared_ptr<nvmap> nvmap_dev) : nvdevice(), nvmap_dev(std::move(nvmap_dev)) {} explicit nvdisp_disp0(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {}
~nvdisp_disp0() = default; ~nvdisp_disp0() = default;
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;

View file

@ -18,7 +18,7 @@ class nvmap;
class nvhost_as_gpu final : public nvdevice { class nvhost_as_gpu final : public nvdevice {
public: public:
nvhost_as_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {} explicit nvhost_as_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {}
~nvhost_as_gpu() override = default; ~nvhost_as_gpu() override = default;
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;

View file

@ -18,7 +18,7 @@ constexpr u32 NVGPU_IOCTL_CHANNEL_SUBMIT_GPFIFO(0x8);
class nvhost_gpu final : public nvdevice { class nvhost_gpu final : public nvdevice {
public: public:
nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {} explicit nvhost_gpu(std::shared_ptr<nvmap> nvmap_dev) : nvmap_dev(std::move(nvmap_dev)) {}
~nvhost_gpu() override = default; ~nvhost_gpu() override = default;
u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override; u32 ioctl(Ioctl command, const std::vector<u8>& input, std::vector<u8>& output) override;

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void CreateService(Kernel::HLERequestContext& ctx); void CreateService(Kernel::HLERequestContext& ctx);
void CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx); void CreateServiceWithoutInitialize(Kernel::HLERequestContext& ctx);

View file

@ -22,7 +22,7 @@ namespace Service::SM {
/// Interface to "sm:" service /// Interface to "sm:" service
class SM final : public ServiceFramework<SM> { class SM final : public ServiceFramework<SM> {
public: public:
SM(std::shared_ptr<ServiceManager> service_manager); explicit SM(std::shared_ptr<ServiceManager> service_manager);
~SM() override; ~SM() override;
private: private:

View file

@ -12,7 +12,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name); explicit Interface(std::shared_ptr<Module> module, const char* name);
void GetRandomBytes(Kernel::HLERequestContext& ctx); void GetRandomBytes(Kernel::HLERequestContext& ctx);

View file

@ -57,7 +57,7 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> time, const char* name); explicit Interface(std::shared_ptr<Module> time, const char* name);
void GetStandardUserSystemClock(Kernel::HLERequestContext& ctx); void GetStandardUserSystemClock(Kernel::HLERequestContext& ctx);
void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx); void GetStandardNetworkSystemClock(Kernel::HLERequestContext& ctx);

View file

@ -579,7 +579,7 @@ private:
class ISystemDisplayService final : public ServiceFramework<ISystemDisplayService> { class ISystemDisplayService final : public ServiceFramework<ISystemDisplayService> {
public: public:
ISystemDisplayService() : ServiceFramework("ISystemDisplayService") { explicit ISystemDisplayService() : ServiceFramework("ISystemDisplayService") {
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{1200, nullptr, "GetZOrderCountMin"}, {1200, nullptr, "GetZOrderCountMin"},
{1202, nullptr, "GetZOrderCountMax"}, {1202, nullptr, "GetZOrderCountMax"},
@ -777,7 +777,7 @@ private:
class IApplicationDisplayService final : public ServiceFramework<IApplicationDisplayService> { class IApplicationDisplayService final : public ServiceFramework<IApplicationDisplayService> {
public: public:
IApplicationDisplayService(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger); explicit IApplicationDisplayService(std::shared_ptr<NVFlinger::NVFlinger> nv_flinger);
~IApplicationDisplayService() = default; ~IApplicationDisplayService() = default;
private: private:

View file

@ -24,8 +24,8 @@ class Module final {
public: public:
class Interface : public ServiceFramework<Interface> { class Interface : public ServiceFramework<Interface> {
public: public:
Interface(std::shared_ptr<Module> module, const char* name, explicit Interface(std::shared_ptr<Module> module, const char* name,
std::shared_ptr<NVFlinger::NVFlinger> nv_flinger); std::shared_ptr<NVFlinger::NVFlinger> nv_flinger);
void GetDisplayService(Kernel::HLERequestContext& ctx); void GetDisplayService(Kernel::HLERequestContext& ctx);