refactor: use squared distance if possible
refactor: add some const-correctness to code
This commit is contained in:
parent
a49a4000c9
commit
4a35a87b25
24 changed files with 579 additions and 567 deletions
|
|
@ -57,7 +57,7 @@ void BotSupport::addChatErrors (String &line) {
|
|||
auto length = static_cast <int32_t> (line.length ());
|
||||
|
||||
if (length > 15) {
|
||||
auto percentile = length / 2;
|
||||
const auto percentile = length / 2;
|
||||
|
||||
// "length / 2" percent of time drop a character
|
||||
if (rg.chance (percentile)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue