apov1 / PA193_mnemonic_SIGSEGVboys

Autumn 2019 semester project for PA193
GNU General Public License v3.0
0 stars 1 forks source link

DICTIONARY_SIZE #9

Open martinhoracek opened 4 years ago

martinhoracek commented 4 years ago

There is globally defined macro DICTIONARY_SIZE. It is defined in two places. It should be hidden in the BIP39 namespace and defined only in one place.

sabi1k98 commented 4 years ago

Definitions of the same macro in 2 separate files was an oversight, thanks for pointing that out. However, macro's cannot be "hidden" inside of namespaces, as they are preprocessor directives, and are evaluated before anything else during the compilation. Maybe redefining it as a const int (or maybe even constexpr int) attribute would be a more sensible decision if you want to achieve encapsulation.