mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 12:00:03 +00:00
misc: fix issues pointed out by msvc (#7316)
* do not move constant variables
* applet_manager: avoid possible use after move
* use constant references where pointed out by msvc
* extra_hid: initialize response
* ValidateSaveState: passing slot separately is not necessary
* common: mark HashCombine as nodiscard
* cityhash: remove use of using namespace std
* Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
based on 7d8f115
* shared_memory.cpp: fix log error format
* fix compiling with pch off
This commit is contained in:
parent
6069fac76d
commit
c8c2beaeff
73 changed files with 181 additions and 167 deletions
|
@ -112,9 +112,9 @@ static URLInfo SplitUrl(const std::string& url) {
|
|||
};
|
||||
}
|
||||
|
||||
static size_t WriteHeaders(httplib::Stream& stream,
|
||||
std::span<const Context::RequestHeader> headers) {
|
||||
size_t write_len = 0;
|
||||
static std::size_t WriteHeaders(httplib::Stream& stream,
|
||||
std::span<const Context::RequestHeader> headers) {
|
||||
std::size_t write_len = 0;
|
||||
for (const auto& header : headers) {
|
||||
auto len = stream.write_format("%s: %s\r\n", header.name.c_str(), header.value.c_str());
|
||||
if (len < 0) {
|
||||
|
@ -130,8 +130,8 @@ static size_t WriteHeaders(httplib::Stream& stream,
|
|||
return write_len;
|
||||
}
|
||||
|
||||
static size_t HandleHeaderWrite(std::vector<Context::RequestHeader>& pending_headers,
|
||||
httplib::Stream& strm, httplib::Headers& httplib_headers) {
|
||||
static std::size_t HandleHeaderWrite(std::vector<Context::RequestHeader>& pending_headers,
|
||||
httplib::Stream& strm, httplib::Headers& httplib_headers) {
|
||||
std::vector<Context::RequestHeader> final_headers;
|
||||
std::vector<Context::RequestHeader>::iterator it_pending_headers;
|
||||
httplib::Headers::iterator it_httplib_headers;
|
||||
|
@ -508,7 +508,7 @@ void HTTP_C::ReceiveDataImpl(Kernel::HLERequestContext& ctx, bool timeout) {
|
|||
}
|
||||
Context& http_context = GetContext(async_data->context_handle);
|
||||
|
||||
const size_t remaining_data =
|
||||
const std::size_t remaining_data =
|
||||
http_context.response.body.size() - http_context.current_copied_data;
|
||||
|
||||
if (async_data->buffer_size >= remaining_data) {
|
||||
|
|
|
@ -217,7 +217,7 @@ public:
|
|||
std::future<void> request_future;
|
||||
std::atomic<u64> current_download_size_bytes;
|
||||
std::atomic<u64> total_download_size_bytes;
|
||||
size_t current_copied_data;
|
||||
std::size_t current_copied_data;
|
||||
bool uses_default_client_cert{};
|
||||
httplib::Response response;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue