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

Fix compilation error: taking address of rvalue in dlg_settings_ex.cpp #19

Open
Lekhak123 opened this issue Jan 19, 2025 · 0 comments · May be fixed by #20
Open

Fix compilation error: taking address of rvalue in dlg_settings_ex.cpp #19

Lekhak123 opened this issue Jan 19, 2025 · 0 comments · May be fixed by #20

Comments

@Lekhak123
Copy link

When compiling florb v1.1 on Fedora 41, encountered a compilation error in dlg_settings_ex.cpp:197:

dlg_settings_ex.cpp:197:88: error: taking address of rvalue [-fpermissive]
m_input_trackwidth->value(static_cast<std::ostringstream*>( &(std::ostringstream() << m_cfgui.tracklinewidth()) )->str().c_str());

The error occurs because the code attempts to take the address of a temporary stringstream object.
Fixed by replacing the problematic line with:

m_input_trackwidth->value(std::to_string(m_cfgui.tracklinewidth()).c_str());

Environment:

  • OS: Fedora 41
  • Compiler: g++ (version from Fedora 41)
  • Build system: omake
  • florb version: 1.1
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

Successfully merging a pull request may close this issue.

1 participant