diff --git a/include/final/foptiattr.h b/include/final/foptiattr.h index 88e0b9e5..38621b02 100644 --- a/include/final/foptiattr.h +++ b/include/final/foptiattr.h @@ -194,13 +194,6 @@ class FOptiAttr all_tests = 0x1f }; - enum default_color - { - Default = -1, - Black = 0, - LightGray = 7 - }; - enum attr_modes { standout_mode = 1, diff --git a/src/flistbox.cpp b/src/flistbox.cpp index be5c7431..1c314940 100644 --- a/src/flistbox.cpp +++ b/src/flistbox.cpp @@ -1333,7 +1333,6 @@ void FListBox::recalculateHorizontalBar (int len, bool has_brackets) if ( ! hbar->isVisible() ) hbar->setVisible(); } - } //---------------------------------------------------------------------- diff --git a/src/fmenu.cpp b/src/fmenu.cpp index ab430a9b..de6ae73b 100644 --- a/src/fmenu.cpp +++ b/src/fmenu.cpp @@ -1626,7 +1626,6 @@ inline void FMenu::keyRight (FKeyEvent* ev) } else keypressMenuBar(ev); // select next menu - } //---------------------------------------------------------------------- diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index 59c9bed7..4d771091 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -1067,8 +1067,8 @@ bool FOptiAttr::setTermDefaultColor (char_data*& term) if ( ! term ) return false; - term->fg_color = Default; - term->bg_color = Default; + term->fg_color = fc::Default; + term->bg_color = fc::Default; if ( append_sequence(F_orig_pair.cap) ) return true; @@ -1230,8 +1230,8 @@ inline void FOptiAttr::resetColor (char_data*& attr) { if ( attr ) { - attr->fg_color = Default; - attr->bg_color = Default; + attr->fg_color = fc::Default; + attr->bg_color = fc::Default; } } @@ -1400,7 +1400,7 @@ void FOptiAttr::change_color (char_data*& term, char_data*& next) fg = next->fg_color; bg = next->bg_color; - if ( fg == Default || bg == Default ) + if ( fg == fc::Default || bg == fc::Default ) change_to_default_color (term, next, fg, bg); if ( fake_reverse && fg < 0 && bg < 0 ) @@ -1411,7 +1411,7 @@ void FOptiAttr::change_color (char_data*& term, char_data*& next) { std::swap (fg, bg); - if ( fg == Default || bg == Default ) + if ( fg == fc::Default || bg == fc::Default ) setTermDefaultColor(term); } @@ -1428,18 +1428,18 @@ inline void FOptiAttr::change_to_default_color ( char_data*& term { if ( ansi_default_color ) { - if ( fg == Default && term->fg_color != Default - && bg == Default && term->bg_color != Default ) + if ( fg == fc::Default && term->fg_color != fc::Default + && bg == fc::Default && term->bg_color != fc::Default ) { setTermDefaultColor(term); } - else if ( fg == Default && term->fg_color != Default ) + else if ( fg == fc::Default && term->fg_color != fc::Default ) { char sgr_39[] = CSI "39m"; append_sequence (sgr_39); - term->fg_color = Default; + term->fg_color = fc::Default; } - else if ( bg == Default && term->bg_color != Default ) + else if ( bg == fc::Default && term->bg_color != fc::Default ) { char* sgr_49; char* op = F_orig_pair.cap; @@ -1450,14 +1450,14 @@ inline void FOptiAttr::change_to_default_color ( char_data*& term sgr_49 = C_STR(CSI "49m"); append_sequence (sgr_49); - term->bg_color = Default; + term->bg_color = fc::Default; } } else if ( ! setTermDefaultColor(term) ) { // Fallback to gray on black - fg = next->fg_color = LightGray; - bg = next->bg_color = Black; + fg = next->fg_color = fc::LightGray; + bg = next->bg_color = fc::Black; } } diff --git a/src/fscrollview.cpp b/src/fscrollview.cpp index 9a56628e..08408c96 100644 --- a/src/fscrollview.cpp +++ b/src/fscrollview.cpp @@ -395,7 +395,6 @@ void FScrollView::scrollTo (int x, int y) viewport->has_changes = true; copy2area(); updateTerminal(); - } //---------------------------------------------------------------------- diff --git a/src/test/fstring-test.cpp b/src/test/fstring-test.cpp index 70b01e43..7536368f 100644 --- a/src/test/fstring-test.cpp +++ b/src/test/fstring-test.cpp @@ -505,7 +505,6 @@ void FStringTest::additionTest() const char c2 = 'a'; CPPUNIT_ASSERT ( c2 + s5 == "aabc" ); CPPUNIT_ASSERT ( c2 + FString("def") == L"adef" ); - } //----------------------------------------------------------------------