Skip to content

Fix -Wdangling-capture warning in CalcEngine::GetString()#2434

Open
dongfengweixiao wants to merge 1 commit intomicrosoft:mainfrom
dongfengweixiao:fix/dangling-capture
Open

Fix -Wdangling-capture warning in CalcEngine::GetString()#2434
dongfengweixiao wants to merge 1 commit intomicrosoft:mainfrom
dongfengweixiao:fix/dangling-capture

Conversation

@dongfengweixiao
Copy link

Store the temporary std::wstring object in a local variable before using it as a key for the unordered_map lookup. This prevents the compiler warning about capturing a reference to an object that will be destroyed at the end of the full-expression.

Store the temporary std::wstring object in a local variable before using
it as a key for the unordered_map lookup. This prevents the compiler
warning about capturing a reference to an object that will be destroyed
at the end of the full-expression.
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 this pull request may close these issues.

1 participant