Skip to content

Commit 2ddcd03

Browse files
committed
Put encoder/decoder tables for EFM in private unnamed namespace
Don't know why this wasn't done in the first place, they are implementation details and should not be exposed publicly (even though they're not in the header, I don't even want the symbols available at least not implicitly).
1 parent 37c299b commit 2ddcd03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dengr/eight_to_fourteen.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,9 @@ namespace {
9999
*/
100100
std::array<PresentByte, 0b10010010010010 + 1> lookup_table;
101101
};
102-
}
103102

104-
namespace com::saxbophone::dengr::eight_to_fourteen {
105103
/**
106-
* @brief Lookup table used to encode 8-bit bytes into 14-bit EFM codes
104+
* Lookup table used to encode 8-bit bytes into 14-bit EFM codes
107105
*/
108106
static constexpr std::array<ChannelByte, 256> ENCODING_TABLE = {
109107
0b01001000100000,
@@ -365,10 +363,12 @@ namespace com::saxbophone::dengr::eight_to_fourteen {
365363
};
366364

367365
/**
368-
* @brief Lookup table used to decode 14-bit EFM codes into 8-bit bytes
366+
* Lookup table used to decode 14-bit EFM codes into 8-bit bytes
369367
*/
370368
static constexpr DecoderLookupTable DECODING_TABLE(ENCODING_TABLE);
369+
}
371370

371+
namespace com::saxbophone::dengr::eight_to_fourteen {
372372
ChannelByte encode(Byte byte) {
373373
/*
374374
* NOTE: no need to use the bounds-checking interface of std::array here

0 commit comments

Comments
 (0)