# HG changeset patch # User Paper # Date 1701881279 18000 # Node ID 6ef31dbb90cafb5379fc694370265024a711efc8 # Parent 62e336597bb76004e37499fc9824dad84697636b anime: no unnecessary conversion to floating point diff -r 62e336597bb7 -r 6ef31dbb90ca src/core/anime.cc --- a/src/core/anime.cc Tue Dec 05 13:45:23 2023 -0500 +++ b/src/core/anime.cc Wed Dec 06 11:47:59 2023 -0500 @@ -49,12 +49,8 @@ return ""; switch (session.config.anime_list.score_format) { - case ScoreFormat::POINT_10_DECIMAL: { - std::ostringstream out; - out.precision(1); - out << std::fixed << (static_cast(score) / 10); - return std::move(out).str(); - } + case ScoreFormat::POINT_10_DECIMAL: + return std::to_string(score / 10) + "." + std::to_string(score % 10); case ScoreFormat::POINT_10: return std::to_string(score / 10); case ScoreFormat::POINT_5: {