From b6a281eaff5e0118b9841ab0bfdc0f59afbf994f Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Fri, 4 Jun 2010 20:54:13 +0000 Subject: [PATCH] Nits. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5606 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/IniFile.cpp | 6 +++--- Source/Core/Common/Src/StringUtil.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Common/Src/IniFile.cpp b/Source/Core/Common/Src/IniFile.cpp index 84f5a099d1..b9e46feb28 100644 --- a/Source/Core/Common/Src/IniFile.cpp +++ b/Source/Core/Common/Src/IniFile.cpp @@ -90,12 +90,12 @@ std::string* IniFile::Section::GetLine(const char* key, std::string* valueOut, s void IniFile::Section::Set(const char* key, const char* newValue) { - std::string value, comment; - std::string* line = GetLine(key, &value, &comment); + std::string value, commented; + std::string* line = GetLine(key, &value, &commented); if (line) { // Change the value - keep the key and comment - *line = StripSpaces(key) + " = " + newValue + comment; + *line = StripSpaces(key) + " = " + newValue + commented; } else { diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index 5165363094..438fa492a0 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -261,7 +261,7 @@ bool TryParseBool(const char* str, bool* output) bool TryParseFloat(const char* str, float *output) { - double d_val; + float d_val; if (sscanf(str, "%f", &d_val) == 1) { *output = (float)d_val; @@ -275,7 +275,7 @@ bool TryParseFloat(const char* str, float *output) bool TryParseDouble(const char* str, double *output) { - return sscanf(str, "%f", output) == 1; + return sscanf(str, "%lf", output) == 1; } std::string StringFromInt(int value)