Page MenuHomeWildfire Games

Don't move temporaries, so possibly allowing for copy elision.
ClosedPublic

Authored by leper on May 4 2017, 1:36 AM.

Details

Reviewers
wraitii
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Commits
rP19559: Don't move temporaries, so possibly allowing for copy elision.
Summary

Pointed out by a clang warning.

Test Plan

-

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

leper created this revision.May 4 2017, 1:36 AM

What's the clang warning? Could you post it?

Vulcan added a subscriber: Vulcan.May 4 2017, 12:55 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/992/ for more details.

wraitii added a subscriber: wraitii.EditedMay 4 2017, 1:39 PM

I've noticed that one too, it's

warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]

I'll check locally if this handles all of those warnings unless someone does it first. Ought to be safe to do.

wraitii accepted this revision.May 9 2017, 10:18 AM

This is all of them according to my compiler.

This revision is now accepted and ready to land.May 9 2017, 10:18 AM
This revision was automatically updated to reflect the committed changes.