summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Rodrigo Locatti2019-10-06 23:35:12 +0000
committerGravatar GitHub2019-10-06 23:35:12 +0000
commitdcdd887df3549d41c3fdaf4ad8a20218179039d5 (patch)
treeece0f2275d10663f4b49fe737c6401536d0758c8 /src
parentMerge pull request #2955 from lioncash/allocator (diff)
parentbcat/module: Silence truncation warnings (diff)
downloadyuzu-dcdd887df3549d41c3fdaf4ad8a20218179039d5.tar.gz
yuzu-dcdd887df3549d41c3fdaf4ad8a20218179039d5.tar.xz
yuzu-dcdd887df3549d41c3fdaf4ad8a20218179039d5.zip
Merge pull request #2952 from lioncash/warning
bcat: Silence various warnings
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/bcat/backend/backend.cpp9
-rw-r--r--src/core/hle/service/bcat/backend/backend.h11
-rw-r--r--src/core/hle/service/bcat/backend/boxcat.cpp3
-rw-r--r--src/core/hle/service/bcat/module.cpp6
4 files changed, 17 insertions, 12 deletions
diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp
index 9b677debe..9d6946bc5 100644
--- a/src/core/hle/service/bcat/backend/backend.cpp
+++ b/src/core/hle/service/bcat/backend/backend.cpp
@@ -10,13 +10,14 @@
10 10
11namespace Service::BCAT { 11namespace Service::BCAT {
12 12
13ProgressServiceBackend::ProgressServiceBackend(std::string event_name) : impl{} { 13ProgressServiceBackend::ProgressServiceBackend(std::string_view event_name) {
14 auto& kernel{Core::System::GetInstance().Kernel()}; 14 auto& kernel{Core::System::GetInstance().Kernel()};
15 event = Kernel::WritableEvent::CreateEventPair( 15 event = Kernel::WritableEvent::CreateEventPair(
16 kernel, Kernel::ResetType::Automatic, "ProgressServiceBackend:UpdateEvent:" + event_name); 16 kernel, Kernel::ResetType::Automatic,
17 std::string("ProgressServiceBackend:UpdateEvent:").append(event_name));
17} 18}
18 19
19Kernel::SharedPtr<Kernel::ReadableEvent> ProgressServiceBackend::GetEvent() { 20Kernel::SharedPtr<Kernel::ReadableEvent> ProgressServiceBackend::GetEvent() const {
20 return event.readable; 21 return event.readable;
21} 22}
22 23
@@ -95,7 +96,7 @@ Backend::Backend(DirectoryGetter getter) : dir_getter(std::move(getter)) {}
95 96
96Backend::~Backend() = default; 97Backend::~Backend() = default;
97 98
98NullBackend::NullBackend(const DirectoryGetter& getter) : Backend(std::move(getter)) {} 99NullBackend::NullBackend(DirectoryGetter getter) : Backend(std::move(getter)) {}
99 100
100NullBackend::~NullBackend() = default; 101NullBackend::~NullBackend() = default;
101 102
diff --git a/src/core/hle/service/bcat/backend/backend.h b/src/core/hle/service/bcat/backend/backend.h
index 3f5d8b5dd..51dbd3316 100644
--- a/src/core/hle/service/bcat/backend/backend.h
+++ b/src/core/hle/service/bcat/backend/backend.h
@@ -6,6 +6,9 @@
6 6
7#include <functional> 7#include <functional>
8#include <optional> 8#include <optional>
9#include <string>
10#include <string_view>
11
9#include "common/common_types.h" 12#include "common/common_types.h"
10#include "core/file_sys/vfs_types.h" 13#include "core/file_sys/vfs_types.h"
11#include "core/hle/kernel/readable_event.h" 14#include "core/hle/kernel/readable_event.h"
@@ -85,14 +88,14 @@ public:
85 void FinishDownload(ResultCode result); 88 void FinishDownload(ResultCode result);
86 89
87private: 90private:
88 explicit ProgressServiceBackend(std::string event_name); 91 explicit ProgressServiceBackend(std::string_view event_name);
89 92
90 Kernel::SharedPtr<Kernel::ReadableEvent> GetEvent(); 93 Kernel::SharedPtr<Kernel::ReadableEvent> GetEvent() const;
91 DeliveryCacheProgressImpl& GetImpl(); 94 DeliveryCacheProgressImpl& GetImpl();
92 95
93 void SignalUpdate() const; 96 void SignalUpdate() const;
94 97
95 DeliveryCacheProgressImpl impl; 98 DeliveryCacheProgressImpl impl{};
96 Kernel::EventPair event; 99 Kernel::EventPair event;
97 bool need_hle_lock = false; 100 bool need_hle_lock = false;
98}; 101};
@@ -128,7 +131,7 @@ protected:
128// A backend of BCAT that provides no operation. 131// A backend of BCAT that provides no operation.
129class NullBackend : public Backend { 132class NullBackend : public Backend {
130public: 133public:
131 explicit NullBackend(const DirectoryGetter& getter); 134 explicit NullBackend(DirectoryGetter getter);
132 ~NullBackend() override; 135 ~NullBackend() override;
133 136
134 bool Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) override; 137 bool Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) override;
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp
index 0e451e9c2..64022982b 100644
--- a/src/core/hle/service/bcat/backend/boxcat.cpp
+++ b/src/core/hle/service/bcat/backend/boxcat.cpp
@@ -495,7 +495,8 @@ Boxcat::StatusResult Boxcat::GetStatus(std::optional<std::string>& global,
495 } 495 }
496 496
497 return StatusResult::Success; 497 return StatusResult::Success;
498 } catch (const nlohmann::json::parse_error& e) { 498 } catch (const nlohmann::json::parse_error& error) {
499 LOG_ERROR(Service_BCAT, "{}", error.what());
499 return StatusResult::ParseError; 500 return StatusResult::ParseError;
500 } 501 }
501} 502}
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index 4c01bcd99..1f21b0434 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -451,7 +451,7 @@ private:
451 451
452 IPC::ResponseBuilder rb{ctx, 3}; 452 IPC::ResponseBuilder rb{ctx, 3};
453 rb.Push(RESULT_SUCCESS); 453 rb.Push(RESULT_SUCCESS);
454 rb.Push<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)); 454 rb.Push(static_cast<u32>(write_size * sizeof(DeliveryCacheDirectoryEntry)));
455 } 455 }
456 456
457 void GetCount(Kernel::HLERequestContext& ctx) { 457 void GetCount(Kernel::HLERequestContext& ctx) {
@@ -468,7 +468,7 @@ private:
468 468
469 IPC::ResponseBuilder rb{ctx, 3}; 469 IPC::ResponseBuilder rb{ctx, 3};
470 rb.Push(RESULT_SUCCESS); 470 rb.Push(RESULT_SUCCESS);
471 rb.Push<u32>(files.size()); 471 rb.Push(static_cast<u32>(files.size()));
472 } 472 }
473 473
474 FileSys::VirtualDir root; 474 FileSys::VirtualDir root;
@@ -525,7 +525,7 @@ private:
525 525
526 IPC::ResponseBuilder rb{ctx, 3}; 526 IPC::ResponseBuilder rb{ctx, 3};
527 rb.Push(RESULT_SUCCESS); 527 rb.Push(RESULT_SUCCESS);
528 rb.Push<u32>(size); 528 rb.Push(static_cast<u32>(size));
529 } 529 }
530 530
531 FileSys::VirtualDir root; 531 FileSys::VirtualDir root;