GLK: Change Attributes fields from uint to bool

This commit is contained in:
Paul Gilbert 2019-03-09 20:29:20 -08:00
parent e45dd70654
commit 537e9af4e0
3 changed files with 14 additions and 14 deletions

View File

@ -242,7 +242,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
PropFontInfo *info = &g_conf->_propInfo;
if (fg == zcolor_Default) {
_window->_attr.fgset = 0;
_window->_attr.fgset = false;
_window->_attr.fgcolor = 0;
Windows::_overrideFgSet = false;
Windows::_overrideFgVal = 0;
@ -251,7 +251,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
info->_caretColor = info->_caretSave;
info->_linkColor = info->_linkSave;
} else if (fg != zcolor_Current) {
_window->_attr.fgset = 1;
_window->_attr.fgset = true;
_window->_attr.fgcolor = fg;
Windows::_overrideFgSet = true;
Windows::_overrideFgVal = fg;
@ -264,7 +264,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
if (/*bg != zcolor_Transparent &&*/ bg != zcolor_Cursor) {
if (bg == zcolor_Default) {
_window->_attr.bgset = 0;
_window->_attr.bgset = false;
_window->_attr.bgcolor = 0;
Windows::_overrideBgSet = false;
Windows::_overrideBgVal = 0;
@ -272,7 +272,7 @@ void WindowStream::setZColors(uint fg, uint bg) {
g_conf->_windowColor = g_conf->_windowSave;
g_conf->_borderColor = g_conf->_borderSave;
} else if (bg != zcolor_Current) {
_window->_attr.bgset = 1;
_window->_attr.bgset = true;
_window->_attr.bgcolor = bg;
Windows::_overrideBgSet = true;
Windows::_overrideBgVal = bg;

View File

@ -506,9 +506,9 @@ Window::Window(Windows *windows, uint rock) : _windows(windows), _rock(rock),
_lineRequest(0), _lineRequestUni(0), _charRequest(0), _charRequestUni(0),
_mouseRequest(0), _hyperRequest(0), _moreRequest(0), _scrollRequest(0), _imageLoaded(0),
_echoLineInputBase(true), _lineTerminatorsBase(nullptr), _termCt(0), _echoStream(nullptr) {
_attr.fgset = 0;
_attr.bgset = 0;
_attr.reverse = 0;
_attr.fgset = false;
_attr.bgset = false;
_attr.reverse = false;
_attr.style = 0;
_attr.fgcolor = 0;
_attr.bgcolor = 0;
@ -733,8 +733,8 @@ WindowStyle::WindowStyle(const WindowStyleStatic &src) : font(src.font), reverse
/*--------------------------------------------------------------------------*/
void Attributes::clear() {
fgset = 0;
bgset = 0;
fgset = false;
bgset = false;
fgcolor = 0;
bgcolor = 0;
reverse = false;

View File

@ -316,11 +316,11 @@ struct WindowStyle {
* Window attributes
*/
struct Attributes {
unsigned fgset : 1;
unsigned bgset : 1;
unsigned reverse : 1;
unsigned : 1;
unsigned style : 4;
bool fgset : 1;
bool bgset : 1;
bool reverse : 1;
unsigned : 1;
unsigned style : 4;
uint fgcolor;
uint bgcolor;
uint hyper;