summaryrefslogtreecommitdiffstats
path: root/external/libnumbertext/deprecated.patch.0
blob: 8ee86ac135c5ae5ad201a5635e5a3796e85548be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- src/Numbertext.cxx
+++ src/Numbertext.cxx
@@ -41,7 +41,14 @@
     std::wifstream wif(filename);
     if (wif.fail())
         return false;
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     wif.imbue(std::locale(std::locale(), new std::codecvt_utf8<wchar_t>));
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
     std::wstringstream wss;
     wss << wif.rdbuf();
     result = wss.str();
@@ -122,8 +129,15 @@
     MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, wstr.get(), nSize);
     return wstr.get();
 #elif !defined NUMBERTEXT_BOOST
+#if defined __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     typedef std::codecvt_utf8<wchar_t> convert_type;
     std::wstring_convert<convert_type, wchar_t> converter;
+#if defined __GNUC__
+#pragma GCC diagnostic pop
+#endif
     return converter.from_bytes( s );
 #else
     return ::locale::conv::utf_to_utf<wchar_t>(s.c_str(), s.c_str() + s.size());
@@ -138,6 +152,9 @@
     WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, str.get(), nSize, nullptr, nullptr);
     return str.get();
 #elif !defined NUMBERTEXT_BOOST
+#if defined __GNUC__
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     typedef std::codecvt_utf8<wchar_t> convert_type;
     std::wstring_convert<convert_type, wchar_t> converter;
     return converter.to_bytes( s );