aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-11-01 13:00:12 +1100
committerNeil <nyamatongwe@gmail.com>2019-11-01 13:00:12 +1100
commit0777bb261f970bfb6c7cde06544630df37024322 (patch)
tree3228eb3b1363f359c498474d21aa3448227cfbb1
parenta975005246dc972de1e61d866fd4dfe617c89ab2 (diff)
downloadscintilla-mirror-0777bb261f970bfb6c7cde06544630df37024322.tar.gz
Remove noexcept from allocating constructors as may throw on memory exhaustion.
-rw-r--r--lexlib/CharacterCategory.cxx2
-rw-r--r--lexlib/CharacterCategory.h2
-rw-r--r--src/PositionCache.cxx2
-rw-r--r--src/PositionCache.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/lexlib/CharacterCategory.cxx b/lexlib/CharacterCategory.cxx
index 35f636564..1e7ae8361 100644
--- a/lexlib/CharacterCategory.cxx
+++ b/lexlib/CharacterCategory.cxx
@@ -4016,7 +4016,7 @@ bool IsXidContinue(int character) {
}
}
-CharacterCategoryMap::CharacterCategoryMap() noexcept {
+CharacterCategoryMap::CharacterCategoryMap() {
Optimize(256);
}
diff --git a/lexlib/CharacterCategory.h b/lexlib/CharacterCategory.h
index d1ac39152..cd3320dd9 100644
--- a/lexlib/CharacterCategory.h
+++ b/lexlib/CharacterCategory.h
@@ -32,7 +32,7 @@ class CharacterCategoryMap {
private:
std::vector<unsigned char> dense;
public:
- CharacterCategoryMap() noexcept;
+ CharacterCategoryMap();
CharacterCategory CategoryFor(int character) const {
if (static_cast<size_t>(character) < dense.size()) {
return static_cast<CharacterCategory>(dense[character]);
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx
index ea281f7ab..8cdbb4f3d 100644
--- a/src/PositionCache.cxx
+++ b/src/PositionCache.cxx
@@ -489,7 +489,7 @@ static unsigned int KeyFromString(const char *charBytes, size_t len) {
return k;
}
-SpecialRepresentations::SpecialRepresentations() noexcept {
+SpecialRepresentations::SpecialRepresentations() {
const short none = 0;
std::fill(startByteHasReprs, std::end(startByteHasReprs), none);
}
diff --git a/src/PositionCache.h b/src/PositionCache.h
index d004dbcd2..faae023f8 100644
--- a/src/PositionCache.h
+++ b/src/PositionCache.h
@@ -213,7 +213,7 @@ class SpecialRepresentations {
MapRepresentation mapReprs;
short startByteHasReprs[0x100];
public:
- SpecialRepresentations() noexcept;
+ SpecialRepresentations();
void SetRepresentation(const char *charBytes, const char *value);
void ClearRepresentation(const char *charBytes);
const Representation *RepresentationFromCharacter(const char *charBytes, size_t len) const;