We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents be6b131 + 9a9f47b commit 37c299bCopy full SHA for 37c299b
dengr/eight_to_fourteen.cpp
@@ -83,13 +83,10 @@ namespace {
83
* When called with out-of-bounds indexes, it returns a 'null'
84
* PresentByte
85
*/
86
- const PresentByte& operator[](std::size_t i) const {
87
- /*
88
- * in this case, element #0 is our 'null' element since we know it's
89
- * empty, as EFM bit pattern 0 is not valid
90
- */
+ const PresentByte operator[](std::size_t i) const {
+ // return indexed byte if not out of bounds, else 'null' byte
91
return i < this->lookup_table.size() ? this->lookup_table[i]
92
- : this->lookup_table[0];
+ : PresentByte(); // 'null'
93
}
94
95
private:
0 commit comments