mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Just some lint fixing
This commit is contained in:
@@ -30,11 +30,11 @@
|
||||
// This unescapes # signs.
|
||||
// NOTE: These parse functions can make better use of the string_view - the pos argument should not be needed, for example.
|
||||
static bool ParseLineKey(std::string_view line, size_t &pos, std::string *keyOut) {
|
||||
std::string key = "";
|
||||
std::string key;
|
||||
|
||||
while (pos < line.size()) {
|
||||
size_t next = line.find_first_of("=#", pos);
|
||||
if (next == line.npos || next == 0) {
|
||||
if (next == std::string::npos || next == 0) {
|
||||
// Key never ended or empty, invalid.
|
||||
return false;
|
||||
} else if (line[next] == '#') {
|
||||
@@ -68,14 +68,14 @@ static bool ParseLineValue(std::string_view line, size_t &pos, std::string *valu
|
||||
if (strippedLine.size() >= 2 && strippedLine[0] == '"' && strippedLine[strippedLine.size() - 1] == '"') {
|
||||
// Don't remove comment if is surrounded by " "
|
||||
value += line.substr(pos);
|
||||
pos = line.npos; // Won't enter the while below
|
||||
pos = std::string_view::npos; // Won't enter the while below
|
||||
}
|
||||
|
||||
while (pos < line.size()) {
|
||||
size_t next = line.find('#', pos);
|
||||
if (next == line.npos) {
|
||||
if (next == std::string_view::npos) {
|
||||
value += line.substr(pos);
|
||||
pos = line.npos;
|
||||
pos = std::string_view::npos;
|
||||
break;
|
||||
} else if (line[next - 1] != '\\') {
|
||||
// It wasn't escaped, so finish before the #.
|
||||
@@ -148,9 +148,9 @@ static std::string EscapeHash(std::string_view value) {
|
||||
|
||||
for (size_t pos = 0; pos < value.size(); ) {
|
||||
size_t next = value.find('#', pos);
|
||||
if (next == value.npos) {
|
||||
if (next == std::string_view::npos) {
|
||||
result += value.substr(pos);
|
||||
pos = value.npos;
|
||||
pos = std::string_view::npos;
|
||||
} else {
|
||||
result += value.substr(pos, next - pos);
|
||||
result += "\\#";
|
||||
|
||||
@@ -148,6 +148,8 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugUtilsCallback(
|
||||
OutputDebugStringA(msg.c_str());
|
||||
if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
|
||||
if (options->breakOnError && System_GetPropertyBool(SYSPROP_DEBUGGER_PRESENT)) {
|
||||
// If you hit this, you have a vulkan validation error.
|
||||
// Check the console or the Output window in Visual Studio, if you're using that.
|
||||
DebugBreak();
|
||||
}
|
||||
if (options->msgBoxOnError) {
|
||||
|
||||
+1
-1
@@ -1469,7 +1469,7 @@ void EmuScreen::update() {
|
||||
UpdateUIState(coreState != CORE_RUNTIME_ERROR ? UISTATE_INGAME : UISTATE_EXCEPTION);
|
||||
}
|
||||
|
||||
if (errorMessage_.size()) {
|
||||
if (!errorMessage_.empty()) {
|
||||
auto err = GetI18NCategory(I18NCat::ERRORS);
|
||||
auto di = GetI18NCategory(I18NCat::DIALOG);
|
||||
std::string errLoadingFile = GetFriendlyPath(gamePath_) + "\n\n";
|
||||
|
||||
@@ -1197,7 +1197,7 @@ extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_sendRequestResult(JNIEn
|
||||
std::string value = jvalue ? GetJavaString(env, jvalue) : "(no value)";
|
||||
INFO_LOG(Log::System, "Received result of request %d from Java: %d: %d '%s'", jrequestID, (int)result, jintValue, value.c_str());
|
||||
if (result) {
|
||||
g_requestManager.PostSystemSuccess(jrequestID, value.c_str(), jintValue);
|
||||
g_requestManager.PostSystemSuccess(jrequestID, value, jintValue);
|
||||
} else {
|
||||
g_requestManager.PostSystemFailure(jrequestID, jintValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user