Skip to content

Commit 31f5fd7

Browse files
committed
fixed naming-varname selfcheck warnings
1 parent ef41848 commit 31f5fd7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/color.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <cstddef>
2525
#include <sstream> // IWYU pragma: keep
2626

27-
bool DISABLE_COLORS = false;
27+
bool gDisableColors = false;
2828

2929
#ifdef _WIN32
3030
std::ostream& operator<<(std::ostream& os, const Color& /*c*/)
@@ -34,7 +34,7 @@ std::ostream& operator<<(std::ostream & os, const Color& c)
3434
{
3535
// TODO: handle piping into file as well as other pipes like stderr
3636
static const bool s_is_tty = isatty(STDOUT_FILENO);
37-
if (!DISABLE_COLORS && s_is_tty)
37+
if (!gDisableColors && s_is_tty)
3838
return os << "\033[" << static_cast<std::size_t>(c) << "m";
3939
#endif
4040
return os;

lib/color.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ CPPCHECKLIB std::ostream& operator<<(std::ostream& os, const Color& c);
4242

4343
CPPCHECKLIB std::string toString(const Color& c);
4444

45-
extern CPPCHECKLIB bool DISABLE_COLORS; // for testing
45+
extern CPPCHECKLIB bool gDisableColors; // for testing
4646

4747
#endif

test/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int main(int argc, char *argv[])
3131
#endif
3232

3333
Preprocessor::macroChar = '$'; // While macroChar is char(1) per default outside test suite, we require it to be a human-readable character here.
34-
DISABLE_COLORS = true;
34+
gDisableColors = true;
3535

3636
options args(argc, argv);
3737

0 commit comments

Comments
 (0)