Commit 0378cf85 authored by Mathieu Valois's avatar Mathieu Valois
Browse files

Simplify string substr

parent 019a9747
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -78,12 +78,10 @@ struct Statistics {
template<typename Type>
void readResult(const uint64_t& occ, const Type& mask, const uint64_t& total_counter, const int& hiderare) {
    if(occ == 0) return;
    std::ostringstream ss;
    float perc = percentage(occ, total_counter);

    if (perc >= hiderare) {
        ss << perc;
        std::string value(ss.str());
        std::string value = std::to_string(perc);
        value = value.substr(0,5);

        std::cout << std::setw(40) << std::right << mask << ":  "