dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Fix compiler warning about multiline comments #863

Closed scravy closed 5 years ago

scravy commented 5 years ago

https://github.com/dtr-org/unit-e/pull/793 introduced comments which produce warnings in gcc as they use the blackslash character at the end of a line. The backslash character continues a line which means that:

int x = 3;
// comment \
x = 4;
std::cout << x << std::endl;

would adjoin the line x = 4 to the comment before. The snippet above will print 3, clearly not what was intended. The syntax highlight here in github shows this nicely too.

@kostyantyn and I were discussing to use a unicode character instead, but unfortunately having unicode characters in the codebase screws up some lint scripts :-(

So I am going for the alternative proposed by @kostyantyn , which is to use

|
>

instead for the ascii graphic.

Signed-off-by: Julian Fleischer julian@thirdhash.com