Open Bug 2012658 Opened 10 days ago Updated 7 days ago

Use move semantic instead of copy when possible

Categories

(Core :: General, task)

task

Tracking

()

People

(Reporter: sergesanspaille, Assigned: sergesanspaille)

References

Details

Coverity recently pointed out that performance bug in our code: Bug 2012340.
Basically when a value is copied at some point and not used any further, it's better to move it (and I like to move it!).

Minimal example

void foo(std::vector<int>& out, std::vector<int> in) {
    out = in; // << better to std::move there
}

This is a source of inefficiencies we should be removing.

Depends on: 2012340
Depends on: 2012660
Depends on: 2013401
Depends on: 2013501
Depends on: 2013504
Depends on: 2013512
Depends on: 2013521
Depends on: 2013525
Depends on: 2013532
Depends on: 2013535
Depends on: 2013542
Depends on: 2013545
You need to log in before you can comment on or make changes to this bug.