mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-09 20:30:05 +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
|
@ -81,8 +81,8 @@ jstring Java_org_citra_citra_1emu_model_GameInfo_getTitle(JNIEnv* env, jobject o
|
|||
Loader::SMDH::TitleLanguage language = Loader::SMDH::TitleLanguage::English;
|
||||
|
||||
// Get the title from SMDH in UTF-16 format
|
||||
std::u16string title{
|
||||
reinterpret_cast<char16_t*>(smdh->titles[static_cast<size_t>(language)].long_title.data())};
|
||||
std::u16string title{reinterpret_cast<char16_t*>(
|
||||
smdh->titles[static_cast<std::size_t>(language)].long_title.data())};
|
||||
|
||||
return ToJString(env, Common::UTF16ToUTF8(title).data());
|
||||
}
|
||||
|
@ -93,8 +93,8 @@ jstring Java_org_citra_citra_1emu_model_GameInfo_getCompany(JNIEnv* env, jobject
|
|||
|
||||
// Get the Publisher's name from SMDH in UTF-16 format
|
||||
char16_t* publisher;
|
||||
publisher =
|
||||
reinterpret_cast<char16_t*>(smdh->titles[static_cast<size_t>(language)].publisher.data());
|
||||
publisher = reinterpret_cast<char16_t*>(
|
||||
smdh->titles[static_cast<std::size_t>(language)].publisher.data());
|
||||
|
||||
return ToJString(env, Common::UTF16ToUTF8(publisher).data());
|
||||
}
|
||||
|
|
|
@ -661,8 +661,8 @@ void Java_org_citra_citra_1emu_NativeLibrary_removeAmiibo([[maybe_unused]] JNIEn
|
|||
JNIEXPORT jobject JNICALL Java_org_citra_citra_1emu_utils_CiaInstallWorker_installCIA(
|
||||
JNIEnv* env, jobject jobj, jstring jpath) {
|
||||
std::string path = GetJString(env, jpath);
|
||||
Service::AM::InstallStatus res =
|
||||
Service::AM::InstallCIA(path, [env, jobj](size_t total_bytes_read, size_t file_size) {
|
||||
Service::AM::InstallStatus res = Service::AM::InstallCIA(
|
||||
path, [env, jobj](std::size_t total_bytes_read, std::size_t file_size) {
|
||||
env->CallVoidMethod(jobj, IDCache::GetCiaInstallHelperSetProgress(),
|
||||
static_cast<jint>(file_size), static_cast<jint>(total_bytes_read));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue