[dasher: 151/217] Cleanup
- From: Patrick Welche <pwelche src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dasher: 151/217] Cleanup
- Date: Sat, 27 Feb 2016 12:13:01 +0000 (UTC)
commit be27a8c311823ec6787efc4cbcdd552dab4c6177
Author: Ada Majorek <amajorek google com>
Date: Wed Dec 23 22:21:16 2015 -0800
Cleanup
Src/DasherCore/NodeCreationManager.cpp | 1 -
Src/DasherCore/SettingsStore.cpp | 4 ++--
Src/Win32/Common/WinUTF8.cpp | 12 ------------
Src/Win32/Common/WinUTF8.h | 3 ---
4 files changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/Src/DasherCore/NodeCreationManager.cpp b/Src/DasherCore/NodeCreationManager.cpp
index 3399462..42b5899 100644
--- a/Src/DasherCore/NodeCreationManager.cpp
+++ b/Src/DasherCore/NodeCreationManager.cpp
@@ -158,6 +158,5 @@ void CNodeCreationManager::AddExtras(CDasherNode *pParent) {
void
CNodeCreationManager::ImportTrainingText(const std::string &strPath) {
ProgressNotifier pn(m_pInterface, m_pTrainer);
- ifstream in(strPath.c_str(), ios::binary);
pn.ParseFile(strPath, true);
}
diff --git a/Src/DasherCore/SettingsStore.cpp b/Src/DasherCore/SettingsStore.cpp
index 369ffdd..0b24f24 100644
--- a/Src/DasherCore/SettingsStore.cpp
+++ b/Src/DasherCore/SettingsStore.cpp
@@ -97,9 +97,9 @@ const char * CSettingsStore::ClSet(const std::string &strKey, const std::string
if(strKey == p.second.name) {
switch (p.second.type) {
case ParamBool: {
- if ((strValue == "0") || (strValue == _("true")))
+ if ((strValue == "0") || (strValue == _("true")) || (strValue == _("True")))
SetBoolParameter(p.first, false);
- else if((strValue == "1") || (strValue == _("false")))
+ else if((strValue == "1") || (strValue == _("false")) || (strValue == _("False")))
SetBoolParameter(p.first, true);
else
// Note to translators: This message will be output for a command line
diff --git a/Src/Win32/Common/WinUTF8.cpp b/Src/Win32/Common/WinUTF8.cpp
index ea3a774..6d24135 100644
--- a/Src/Win32/Common/WinUTF8.cpp
+++ b/Src/Win32/Common/WinUTF8.cpp
@@ -6,9 +6,6 @@
//
/////////////////////////////////////////////////////////////////////////////
-#include <locale>
-#include <codecvt>
-
#include "WinCommon.h"
#include "WinUTF8.h"
@@ -84,12 +81,3 @@ void WinUTF8::wstring_to_UTF8string(const wchar_t *Input, string &Output) {
WideCharToMultiByte(CP_UTF8, 0, Input, (int)Output.size(), &Output[0], size_needed, NULL, NULL);
return;
}
-
-std::string WinUTF8::narrow(const wchar_t* wide) {
- auto result = wstring_to_UTF8string(wide);
- // Remove the explicit left to right or right to left mark if present.
- if (result.size() >= 3 && (result.find("\xE2\x80\xAA") == 0 || result.find("\xE2\x80\xAB") == 0)) {
- return result.substr(3);
- }
- return result;
-}
diff --git a/Src/Win32/Common/WinUTF8.h b/Src/Win32/Common/WinUTF8.h
index 7abaad8..40c7d8f 100644
--- a/Src/Win32/Common/WinUTF8.h
+++ b/Src/Win32/Common/WinUTF8.h
@@ -25,8 +25,5 @@ namespace WinUTF8 {
void wstring_to_UTF8string(const std::wstring & Input, std::string & Output);
void wstring_to_UTF8string(const wchar_t *Input, std::string &Output);
std::string wstring_to_UTF8string(const wchar_t* Input);
-
- // Remove the explicit left to right or right to left mark if present.
- std::string narrow(const wchar_t* wide);
}
#endif /* #ifndef __WinUTF8_h__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]