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

The return value of RenderTexture::create is being ignored #190

Closed
vittorioromeo opened this issue Dec 21, 2021 · 2 comments
Closed

The return value of RenderTexture::create is being ignored #190

vittorioromeo opened this issue Dec 21, 2021 · 2 comments

Comments

@vittorioromeo
Copy link
Member

This warning is produced when compiling the latest version of imgui-sfml:

imgui-SFML.cpp: In function 'void ImGui::SFML::UpdateFontTexture()':
imgui-SFML.cpp:584:19: warning: ignoring return value of 
    'bool sf::Texture::create(unsigned int, unsigned int)', declared with attribute 'nodiscard' [-Wunused-result]

  584 |     texture.create(width, height);
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

We would need to react on failure, possibly by printing some sort of error message to the console, or by propagating a return value up the stack to the caller of Init.

@oprypin
Copy link
Member

oprypin commented Mar 29, 2022

This was fixed by #191

@eliasdaler
Copy link
Contributor

Thank you for noticing, closing.

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

3 participants