Skip to content

Commit

Permalink
Make console procedures const.
Browse files Browse the repository at this point in the history
  • Loading branch information
JPeterMugaas committed May 21, 2024
1 parent fb658af commit ef69631
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

cmake_minimum_required (VERSION 3.21)

set(EFXC2_VERSION 0.0.10.230)
set(EFXC2_VERSION 0.0.10.231)
project (efxc2 VERSION ${EFXC2_VERSION}
DESCRIPTION "Enhanced fxc2"
HOMEPAGE_URL "https://github.com/JPeterMugaas/efxc2"
Expand Down
16 changes: 8 additions & 8 deletions efxc2Console.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,31 @@ namespace efxc2Console {
#endif
}

void std_out_pink() {
void std_out_pink() const {
if (IsStdOutputAConsole()) {
std::cout << term_printPink;
}
};
void std_out_reset() {
void std_out_reset() const {
if (IsStdOutputAConsole()) {
std::cout << term_printLtReset;
}
};
void std_err_pink() {
void std_err_pink() const {
if (IsStdErrAConsole()) {
std::cerr << term_printPink;
}
};
void std_err_reset() {
void std_err_reset() const {
if (IsStdErrAConsole()) {
std::cerr << term_printLtReset;
}
};
void PinkOutput() {
void PinkOutput() const {
std_out_pink();
std_err_pink();
}
void ResetOutput() {
void ResetOutput() const {
std_out_reset();
std_err_reset();
}
Expand All @@ -72,14 +72,14 @@ namespace efxc2Console {
HANDLE std_output = nullptr; //-V122
DWORD stdout_orig_console_mode = 0;
#endif
bool IsStdErrAConsole() {
bool IsStdErrAConsole() const {
#ifdef _WIN32
return (GetFileType(std_output) == FILE_TYPE_CHAR);
#else
return (isatty(STDERR_FILENO));
#endif
}
bool IsStdOutputAConsole() {
bool IsStdOutputAConsole() const {
#ifdef _WIN32
return (GetFileType(std_error) == FILE_TYPE_CHAR);
#else
Expand Down

0 comments on commit ef69631

Please sign in to comment.