~singpolyma/biboumi

a3e865ad63a1c0d634001d9d2e86c425bc5094e5 — louiz’ 4 years ago 7d0df9b
Fix a signed/unsigned mismatch
3 files changed, 3 insertions(+), 3 deletions(-)

M src/irc/irc_client.cpp
M src/irc/irc_client.hpp
M src/utils/tokens_bucket.hpp
M src/irc/irc_client.cpp => src/irc/irc_client.cpp +1 -1
@@ 1248,7 1248,7 @@ void IrcClient::on_channel_mode(const IrcMessage& message)
    }
}

void IrcClient::set_throttle_limit(std::size_t limit)
void IrcClient::set_throttle_limit(long int limit)
{
  this->tokens_bucket.set_limit(limit);
}

M src/irc/irc_client.hpp => src/irc/irc_client.hpp +1 -1
@@ 301,7 301,7 @@ public:
  const std::vector<char>& get_sorted_user_modes() const { return this->sorted_user_modes; }

  std::set<char> get_chantypes() const { return this->chantypes; }
  void set_throttle_limit(std::size_t limit);
  void set_throttle_limit(long int limit);
  /**
   * Store the history limit that the client asked when joining this room.
   */

M src/utils/tokens_bucket.hpp => src/utils/tokens_bucket.hpp +1 -1
@@ 19,7 19,7 @@ class TokensBucket
public:
  TokensBucket(long int max_size, std::chrono::milliseconds fill_duration, std::function<bool()> callback, std::string name):
      limit(max_size),
      tokens(limit),
      tokens(static_cast<std::size_t>(limit)),
      callback(std::move(callback))
  {
    log_debug("creating TokensBucket with max size: ", max_size);