Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conversion to ‘float’ from ‘double’ may alter its value [-Werror=float-conversion] #113

Open
IdoSagiv opened this issue Jun 12, 2022 · 0 comments

Comments

@IdoSagiv
Copy link

warning while converting double to float

.../indicators/include/indicators/progress_bar.hpp: In member function ‘void indicators::ProgressBar::print_progress(bool)’:
.../indicators/include/indicators/progress_bar.hpp:325:79: error: conversion to ‘float’ from ‘double’ may alter its value [-Werror=float-conversion]
writer.write(double(progress_) / double(max_progress) * 100.0f);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
cc1plus: all warnings being treated as errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant