Skip to content

Commit

Permalink
Fix "-Werror=conversion".
Browse files Browse the repository at this point in the history
  • Loading branch information
ryouze committed Oct 28, 2024
1 parent cb0cd3d commit de6765b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class UI final {

// Initial setup
const auto update_percentage_text = [&]() {
const float percentage = total_questions > 0 ? (static_cast<float>(correct_answers) / total_questions) * 100.f : 0.f;
const float percentage = total_questions > 0 ? (static_cast<float>(correct_answers) / static_cast<float>(total_questions)) * 100.f : 0.f;
const auto percentage_str = fmt::format("게임 점수: {:.1f}%", percentage);
this->percentage_text_.setString(core::string::to_sfml_string(percentage_str));
};
Expand Down

0 comments on commit de6765b

Please sign in to comment.