aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ScintillaBase.cxx44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx
index e19f75d36..a49cfab32 100644
--- a/src/ScintillaBase.cxx
+++ b/src/ScintillaBase.cxx
@@ -70,8 +70,7 @@ ScintillaBase::ScintillaBase() {
multiAutoCMode = MultiAutoComplete::Once;
}
-ScintillaBase::~ScintillaBase() {
-}
+ScintillaBase::~ScintillaBase() = default;
void ScintillaBase::Finalise() {
Editor::Finalise();
@@ -133,6 +132,9 @@ void ScintillaBase::Command(int cmdId) {
case idcmdSelectAll:
WndProc(Message::SelectAll, 0, 0);
break;
+
+ default:
+ break;
}
}
@@ -606,8 +608,8 @@ public:
const char *DescribeWordListSets();
void SetWordList(int n, const char *wl);
- int GetIdentifier() const;
- const char *GetName() const;
+ [[nodiscard]] int GetIdentifier() const;
+ [[nodiscard]] const char *GetName() const;
void *PrivateCall(int operation, void *pointer);
const char *PropertyNames();
TypeProperty PropertyType(const char *name);
@@ -647,9 +649,8 @@ LexState *ScintillaBase::DocumentLexState() {
const char *LexState::DescribeWordListSets() {
if (instance) {
return instance->DescribeWordListSets();
- } else {
- return nullptr;
}
+ return nullptr;
}
void LexState::SetWordList(int n, const char *wl) {
@@ -678,33 +679,29 @@ const char *LexState::GetName() const {
void *LexState::PrivateCall(int operation, void *pointer) {
if (instance) {
return instance->PrivateCall(operation, pointer);
- } else {
- return nullptr;
}
+ return nullptr;
}
const char *LexState::PropertyNames() {
if (instance) {
return instance->PropertyNames();
- } else {
- return nullptr;
}
+ return nullptr;
}
TypeProperty LexState::PropertyType(const char *name) {
if (instance) {
return static_cast<TypeProperty>(instance->PropertyType(name));
- } else {
- return TypeProperty::Boolean;
}
+ return TypeProperty::Boolean;
}
const char *LexState::DescribeProperty(const char *name) {
if (instance) {
return instance->DescribeProperty(name);
- } else {
- return nullptr;
}
+ return nullptr;
}
void LexState::PropSet(const char *key, const char *val) {
@@ -719,9 +716,8 @@ void LexState::PropSet(const char *key, const char *val) {
const char *LexState::PropGet(const char *key) const {
if (instance) {
return instance->PropertyGet(key);
- } else {
- return nullptr;
}
+ return nullptr;
}
int LexState::PropGetInt(const char *key, int defaultValue) const {
@@ -806,39 +802,35 @@ const char *LexState::GetSubStyleBases() {
int LexState::NamedStyles() {
if (instance) {
return instance->NamedStyles();
- } else {
- return -1;
}
+ return -1;
}
const char *LexState::NameOfStyle(int style) {
if (instance) {
return instance->NameOfStyle(style);
- } else {
- return nullptr;
}
+ return nullptr;
}
const char *LexState::TagsOfStyle(int style) {
if (instance) {
return instance->TagsOfStyle(style);
- } else {
- return nullptr;
}
+ return nullptr;
}
const char *LexState::DescriptionOfStyle(int style) {
if (instance) {
return instance->DescriptionOfStyle(style);
- } else {
- return nullptr;
}
+ return nullptr;
}
void ScintillaBase::NotifyStyleToNeeded(Sci::Position endStyleNeeded) {
if (!DocumentLexState()->UseContainerLexing()) {
- const Sci::Position endStyled = pdoc->LineStartPosition(pdoc->GetEndStyled());
- DocumentLexState()->Colourise(endStyled, endStyleNeeded);
+ const Sci::Position startStyling = pdoc->LineStartPosition(pdoc->GetEndStyled());
+ DocumentLexState()->Colourise(startStyling, endStyleNeeded);
return;
}
Editor::NotifyStyleToNeeded(endStyleNeeded);