diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:15 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:15 +0200 |
commit | 0a48c0f1af4b35338d2360f6efa4c467ec60b60d (patch) | |
tree | 406a6b1bda002889f8a99be215fcc9847dc0cb7e /src/message.cc | |
parent | 656d238d855e3d7640f10c6b0c1dc84380f50e94 (diff) |
Refactor messages.cc to use boost::circular_buffer
We might as well delegate the massive implementation
complexity and get rid of a ton of legacy code.
Diffstat (limited to 'src/message.cc')
-rw-r--r-- | src/message.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/message.cc b/src/message.cc new file mode 100644 index 00000000..a0f46f22 --- /dev/null +++ b/src/message.cc @@ -0,0 +1,15 @@ +#include "message.hpp" + +#include <fmt/format.h> + +std::string message::text_with_count() const +{ + if (count > 1) + { + return fmt::format("{} <{}x>", text, count); + } + else + { + return text; + } +} |