diff options
Diffstat (limited to 'lexlib/PropSetSimple.cxx')
| -rw-r--r-- | lexlib/PropSetSimple.cxx | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/lexlib/PropSetSimple.cxx b/lexlib/PropSetSimple.cxx index 6e1312527..6ee57d667 100644 --- a/lexlib/PropSetSimple.cxx +++ b/lexlib/PropSetSimple.cxx @@ -21,10 +21,14 @@ namespace {  typedef std::map<std::string, std::string> mapss; -mapss *PropsFromPointer(void *impl) { +mapss *PropsFromPointer(void *impl) noexcept {  	return static_cast<mapss *>(impl);  } +constexpr bool IsASpaceCharacter(int ch) noexcept { +	return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); +} +  }  PropSetSimple::PropSetSimple() { @@ -35,7 +39,7 @@ PropSetSimple::PropSetSimple() {  PropSetSimple::~PropSetSimple() {  	mapss *props = PropsFromPointer(impl);  	delete props; -	impl = 0; +	impl = nullptr;  }  void PropSetSimple::Set(const char *key, const char *val, size_t lenKey, size_t lenVal) { @@ -45,10 +49,6 @@ void PropSetSimple::Set(const char *key, const char *val, size_t lenKey, size_t  	(*props)[std::string(key, lenKey)] = std::string(val, lenVal);  } -static bool IsASpaceCharacter(unsigned int ch) { -    return (ch == ' ') || ((ch >= 0x09) && (ch <= 0x0d)); -} -  void PropSetSimple::Set(const char *keyVal) {  	while (IsASpaceCharacter(*keyVal))  		keyVal++; @@ -90,7 +90,7 @@ const char *PropSetSimple::Get(const char *key) const {  // for that, through a recursive function and a simple chain of pointers.  struct VarChain { -	VarChain(const char *var_=nullptr, const VarChain *link_= nullptr): var(var_), link(link_) {} +	VarChain(const char *var_=nullptr, const VarChain *link_= nullptr) noexcept : var(var_), link(link_) {}  	bool contains(const char *testVar) const {  		return (var && (0 == strcmp(var, testVar))) | 
