diff options
author | Adrian Kummerlaender | 2016-04-02 10:44:14 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2016-04-02 10:44:14 +0200 |
commit | 1fbedc31a590116e1f49ed6420960f890a44c467 (patch) | |
tree | 096ba3bc8e2e65a42f11aad6abaa11b3e7312b99 /src/line_accumulator.h | |
parent | ae7ea39966236965500faa96c42986bf35cc9af3 (diff) | |
download | justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar.gz justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar.bz2 justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar.lz justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar.xz justify-1fbedc31a590116e1f49ed6420960f890a44c467.tar.zst justify-1fbedc31a590116e1f49ed6420960f890a44c467.zip |
Implement special case for single missing spaces
Diffstat (limited to 'src/line_accumulator.h')
-rw-r--r-- | src/line_accumulator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/line_accumulator.h b/src/line_accumulator.h index 93ebfc0..373cb1b 100644 --- a/src/line_accumulator.h +++ b/src/line_accumulator.h @@ -10,18 +10,22 @@ class LineAccumulator { LineAccumulator(const std::uint8_t max_length); ~LineAccumulator(); + std::uint8_t getMissing() const; + void operator()(const std::string& word); private: const std::uint8_t max_length_; std::random_device device_; + std::mt19937 random_; std::uint8_t length_; std::vector< std::pair<std::string, std::uint8_t> > tokens_; + void justify(); void discharge(const bool full); }; |