diff options
author | Neil <nyamatongwe@gmail.com> | 2019-04-10 07:53:03 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-04-10 07:53:03 +1000 |
commit | fd5c1e542eff7358447ddda6d43f6a90b3045742 (patch) | |
tree | c1cce1f4052af2901895d6ddd4dbb9dfa4baf615 /src | |
parent | 568f40a9251eee0f17d80dadff5970d78744ee95 (diff) | |
download | scintilla-mirror-fd5c1e542eff7358447ddda6d43f6a90b3045742.tar.gz |
Backport: Use noexcept in CaseConvert as well as std::string_view::copy.
Backport of changeset 7414:599d698f70bf, but without std::string_view::copy.
Diffstat (limited to 'src')
-rw-r--r-- | src/CaseConvert.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/CaseConvert.cxx b/src/CaseConvert.cxx index d57875996..c1cfd38e2 100644 --- a/src/CaseConvert.cxx +++ b/src/CaseConvert.cxx @@ -569,7 +569,7 @@ class CaseConverter : public ICaseConverter { enum { maxConversionLength=6 }; struct ConversionString { char conversion[maxConversionLength+1]; - ConversionString() : conversion{} { + ConversionString() noexcept : conversion{} { } }; // Conversions are initially store in a vector of structs but then decomposed into @@ -591,10 +591,10 @@ class CaseConverter : public ICaseConverter { std::vector<ConversionString> conversions; public: - CaseConverter() { + CaseConverter() noexcept { } virtual ~CaseConverter() = default; - bool Initialised() const { + bool Initialised() const noexcept { return !characters.empty(); } void Add(int character, const char *conversion) { @@ -771,7 +771,7 @@ void SetupConversions(enum CaseConversion conversion) { } } -CaseConverter *ConverterForConversion(enum CaseConversion conversion) { +CaseConverter *ConverterForConversion(enum CaseConversion conversion) noexcept { switch (conversion) { case CaseConversionFold: return &caseConvFold; |