diff options
author | Neil <nyamatongwe@gmail.com> | 2020-07-16 19:55:15 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2020-07-16 19:55:15 +1000 |
commit | b3c9933350e5c6b9d06a72034e681cecae52dc4b (patch) | |
tree | a733fba3b608ba75f4c55ec27cc6026697fdd3b0 /lexlib/OptionSet.h | |
parent | 08b502cac1f88bc511c324ab7eb23d34c4318bd7 (diff) | |
download | scintilla-mirror-b3c9933350e5c6b9d06a72034e681cecae52dc4b.tar.gz |
Add constexpr, const, noexcept and make other small improvements to lexlib.
Diffstat (limited to 'lexlib/OptionSet.h')
-rw-r--r-- | lexlib/OptionSet.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lexlib/OptionSet.h b/lexlib/OptionSet.h index 918eaba4f..3c282e49b 100644 --- a/lexlib/OptionSet.h +++ b/lexlib/OptionSet.h @@ -68,7 +68,7 @@ class OptionSet { } return false; } - const char *Get() const { + const char *Get() const noexcept { return value.c_str(); } }; @@ -83,8 +83,6 @@ class OptionSet { names += name; } public: - virtual ~OptionSet() { - } void DefineProperty(const char *name, plcob pb, std::string description="") { nameToDef[name] = Option(pb, description); AppendName(name); @@ -97,7 +95,7 @@ public: nameToDef[name] = Option(ps, description); AppendName(name); } - const char *PropertyNames() const { + const char *PropertyNames() const noexcept { return names.c_str(); } int PropertyType(const char *name) { @@ -141,7 +139,7 @@ public: } } - const char *DescribeWordListSets() const { + const char *DescribeWordListSets() const noexcept { return wordLists.c_str(); } }; |