Skip to content

Commit 85aaeca

Browse files
committed
Do not enforce noexcept on virtual function mapColor
This was totally inconsistent with the rest of public virtual functions. This does not break already existing code.
1 parent 8aebd90 commit 85aaeca

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ if (delta.y + i < fileLines->getCount()) {
698698
}
699699
writeBuf( 0, i, size.x, 1, b );
700700
```
701-
The overload of `moveStr` used here is `TDrawBuffer::moveStr(ushort indent, TStringView str, TColorAttr attr, ushort maxStrWidth, ushort strIndent)`. This function not only provides Unicode support, but also helps us write cleaner code and overcome some of the limitations previously present:
701+
The overload of `moveStr` used here is `TDrawBuffer::moveStr(ushort indent, TStringView str, TColorAttr attr, ushort maxStrWidth, ushort strIndent = 0)`. This function not only provides Unicode support, but also helps us write cleaner code and overcome some of the limitations previously present:
702702
703703
* The intermediary copy is avoided, so the displayed text is not limited to `maxLineLength` bytes.
704704
* `moveStr` takes care of printing the string starting at column `delta.x`. We do not even need to worry about how many bytes correspond to `delta.x` columns.
@@ -1099,7 +1099,7 @@ So, in general, there are three ways to use extended colors in views:
10991099
11001100
```c++
11011101
// The 'TMyScrollBar' class inherits from 'TScrollBar' and overrides 'TView::mapColor'.
1102-
TColorAttr TMyScrollBar::mapColor(uchar index) noexcept
1102+
TColorAttr TMyScrollBar::mapColor(uchar index)
11031103
{
11041104
// In this example the values are hardcoded,
11051105
// but they could be stored elsewhere if desired.

include/tvision/views.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ class TView : public TObject, public TStreamable
409409
virtual void endModal( ushort command );
410410
virtual ushort execute();
411411

412-
TAttrPair getColor( ushort color ) noexcept;
412+
TAttrPair getColor( ushort color );
413413
virtual TPalette& getPalette() const;
414-
virtual TColorAttr mapColor( uchar ) noexcept;
414+
virtual TColorAttr mapColor( uchar );
415415

416416
Boolean getState( ushort aState ) const noexcept;
417417
void select();

source/tvision/mapcolor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define Uses_TGroup
1818
#include <tvision/tv.h>
1919

20-
TColorAttr TView::mapColor( uchar index ) noexcept
20+
TColorAttr TView::mapColor( uchar index )
2121
{
2222
TPalette& p = getPalette();
2323
TColorAttr color;

source/tvision/tview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ TRect TView::getClipRect() const noexcept
479479
return clip;
480480
}
481481

482-
TAttrPair TView::getColor( ushort color ) noexcept
482+
TAttrPair TView::getColor( ushort color )
483483
{
484484
TAttrPair colorPair = color >> 8;
485485

0 commit comments

Comments
 (0)