Skip to content

Commit 6d6942c

Browse files
committed
fixes
1 parent 0bddea8 commit 6d6942c

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

include/boost/locale/numpunct.hpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@
99
#ifndef BOOST_LOCALE_NUMPUNCT_HPP_INCLUDED
1010
#define BOOST_LOCALE_NUMPUNCT_HPP_INCLUDED
1111
#include <boost/locale/config.hpp>
12-
#ifdef BOOST_MSVC
13-
# pragma warning(push)
14-
# pragma warning(disable : 4275 4251 4231 4660)
15-
#endif
1612
#include <locale>
1713
#include <string>
1814

1915
namespace boost {
2016
namespace locale {
2117

2218
template<typename CharType>
23-
class BOOST_LOCALE_DECL numpunct_base : public std::numpunct<CharType>
19+
class numpunct_base : public std::numpunct<CharType>
2420
{
2521
typedef std::basic_string<CharType> string_type;
2622
public:
@@ -35,7 +31,7 @@ namespace boost {
3531
}
3632

3733
protected:
38-
virtual CharType do_decimal_point() const {
34+
CharType do_decimal_point() const BOOST_OVERRIDE {
3935
string_type dec = do_decimal_point_str();
4036
if (dec.size() > 1) {
4137
return '.';
@@ -49,7 +45,7 @@ namespace boost {
4945
return string_type(t, t + sizeof(t) - 1);
5046
}
5147

52-
virtual CharType do_thousands_sep() const {
48+
CharType do_thousands_sep() const BOOST_OVERRIDE {
5349
string_type thous = do_thousands_sep_str();
5450
if (thous.size() > 1) {
5551
return ',';
@@ -63,18 +59,18 @@ namespace boost {
6359
return string_type(t, t + sizeof(t) - 1);
6460
}
6561

66-
virtual string_type do_truename() const {
62+
virtual string_type do_truename() const BOOST_OVERRIDE {
6763
static const char t[] = "true";
6864
return string_type(t, t + sizeof(t) - 1);
6965
}
7066

71-
virtual string_type do_falsename() const {
67+
virtual string_type do_falsename() const BOOST_OVERRIDE {
7268
static const char t[] = "false";
7369
return string_type(t, t + sizeof(t) - 1);
7470
}
7571
};
7672

77-
template<typename CharType> struct numpunct {};
73+
template<typename CharType> struct numpunct;
7874

7975
template<> struct numpunct<char> : numpunct_base<char> {
8076
numpunct (size_t refs = 0) : numpunct_base<char>(refs) {}

src/boost/locale/icu/numeric.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,13 @@ struct icu_numpunct : public numpunct<CharType> {
381381
}
382382
}
383383
protected:
384-
virtual string_type do_decimal_point_str() const {
384+
string_type do_decimal_point_str() const BOOST_OVERRIDE {
385385
return decimal_point_;
386386
}
387-
virtual string_type do_thousands_sep_str() const {
387+
string_type do_thousands_sep_str() const BOOST_OVERRIDE {
388388
return thousands_sep_;
389389
}
390-
virtual std::string do_grouping() const {
390+
std::string do_grouping() const BOOST_OVERRIDE {
391391
return grouping_;
392392
}
393393

src/boost/locale/posix/numeric.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -423,28 +423,18 @@ class num_punct_posix : public numpunct<CharType> {
423423
{
424424
s2=conv::to_utf<wchar_t>(s1,nl_langinfo_l(CODESET,lc));
425425
}
426-
virtual string_type do_decimal_point_str() const
426+
string_type do_decimal_point_str() const BOOST_OVERRIDE
427427
{
428428
return decimal_point_;
429429
}
430-
virtual string_type do_thousands_sep_str() const
430+
string_type do_thousands_sep_str() const BOOST_OVERRIDE
431431
{
432432
return thousands_sep_;
433433
}
434434
std::string do_grouping() const BOOST_OVERRIDE
435435
{
436436
return grouping_;
437437
}
438-
string_type do_truename() const BOOST_OVERRIDE
439-
{
440-
static const char t[]="true";
441-
return string_type(t,t+sizeof(t)-1);
442-
}
443-
string_type do_falsename() const BOOST_OVERRIDE
444-
{
445-
static const char t[]="false";
446-
return string_type(t,t+sizeof(t)-1);
447-
}
448438
private:
449439
string_type decimal_point_;
450440
string_type thousands_sep_;

src/boost/locale/win32/numeric.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ BOOST_LOCALE_END_CONST_CONDITION
141141
{
142142
s2=conv::from_utf(s1,"UTF-8");
143143
}
144-
virtual string_type do_decimal_point_str() const
144+
string_type do_decimal_point_str() const BOOST_OVERRIDE
145145
{
146146
return decimal_point_;
147147
}
148-
virtual string_type do_thousands_sep_str() const
148+
string_type do_thousands_sep_str() const BOOST_OVERRIDE
149149
{
150150
return thousands_sep_;
151151
}

0 commit comments

Comments
 (0)