define an operator to simplify this expression
what is compared here is the terminalchar_t not the _terminalChar_t
rendered flag in this case is ignored.
probably i would prefer embed the public struct instead of inheriting it.
require a little bit more refactor around the code base.
void VgaTerminal::_setCharAtCursorPosition(const _terminalChar_t& tc) noexcept
{
std::lock_guard lck(_pGridMutex);
_pGrid[_getCursorPosition()] = tc;
_terminalChar_t _tc = _pGrid[_getCursorPosition()];
// TODO define an operator to simply this expression
// BODY what is compared here is the terminalchar_t not the _terminalChar_t
// BODY rendered flag in this case is ignored.
if (!(_tc.c == tc.c && _tc.col == tc.col && _tc.bgCol == tc.bgCol)) {
_pGrid[_getCursorPosition()] = tc;
}
}
define an operator to simplify this expression what is compared here is the
terminalchar_t
not the _terminalChar_t rendered flag in this case is ignored.probably i would prefer embed the public struct instead of inheriting it.
require a little bit more refactor around the code base.
https://github.com/Raffaello/sdl2-vga-terminal/pull/158/commits/7cfb0d2778a2ef0c42a77deb6a0d84ab2dbc3368#diff-def179fd004d0dc0eb36f412bf425652R576-R586
this bit might require a major refactor of the structs and where to organize in the code, might be worth extract from the class...
it could be coupled with other tickets dealing with structs and code re-organization