diff options
author | Neil <nyamatongwe@gmail.com> | 2024-01-30 10:11:10 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2024-01-30 10:11:10 +1100 |
commit | 77d00274b4e729ba5eac3cda390d6aa9478567ca (patch) | |
tree | 01744884872093ea9406a206e554f9d569a3b0d2 /test/unit/testDocument.cxx | |
parent | 72689db0d549c0cb850012546c71117ea74c2f2c (diff) | |
download | scintilla-mirror-77d00274b4e729ba5eac3cda390d6aa9478567ca.tar.gz |
Avoid warnings in unit tests with const, nullptr, [[nodiscard]], initialisation,
and unnamed namespace.
Diffstat (limited to 'test/unit/testDocument.cxx')
-rw-r--r-- | test/unit/testDocument.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/testDocument.cxx b/test/unit/testDocument.cxx index 147614637..3266b0a9d 100644 --- a/test/unit/testDocument.cxx +++ b/test/unit/testDocument.cxx @@ -57,7 +57,7 @@ struct Folding { }; // Table of case folding for non-ASCII bytes in Windows Latin code page 1252 -Folding foldings1252[] = { +const Folding foldings1252[] = { {0x8a, 0x9a, 0x01}, {0x8c, 0x9c, 0x01}, {0x8e, 0x9e, 0x01}, @@ -67,7 +67,7 @@ Folding foldings1252[] = { }; // Table of case folding for non-ASCII bytes in Windows Russian code page 1251 -Folding foldings1251[] = { +const Folding foldings1251[] = { {0x80, 0x90, 0x01}, {0x81, 0x83, 0x01}, {0x8a, 0x9a, 0x01}, @@ -83,7 +83,7 @@ Folding foldings1251[] = { {0xc0, 0xe0, 0x20}, }; -std::string ReadFile(std::string path) { +std::string ReadFile(const std::string &path) { std::ifstream ifs(path, std::ios::binary); std::string content((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>())); |