Skip to content

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

@Lekhak123

Description

@Lekhak123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions