diff options
author | Neil <nyamatongwe@gmail.com> | 2022-08-01 16:48:21 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-08-01 16:48:21 +1000 |
commit | 987598c6d853eac0a99bbf97f4fe847874652ed3 (patch) | |
tree | 3d639ab2a73389c4b6393a7377475af94f7fdce4 /src/Editor.cxx | |
parent | 6db9764146c11637c6cc3d6749a566f17e6f3429 (diff) | |
download | scintilla-mirror-987598c6d853eac0a99bbf97f4fe847874652ed3.tar.gz |
Avoid some warnings from Code Analysis.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index c2c31f0d1..08ee3fc6a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1937,9 +1937,7 @@ SelectionPosition Editor::RealizeVirtualSpace(const SelectionPosition &position) } void Editor::AddChar(char ch) { - char s[2]; - s[0] = ch; - s[1] = '\0'; + const char s[1] {ch}; InsertCharacter(std::string_view(s, 1), CharacterSource::DirectInput); } |