We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc17264 commit a630f59Copy full SHA for a630f59
include/swift/SIL/Projection.h
@@ -394,7 +394,7 @@ class ProjectionPath {
394
/// We only allow for moves of ProjectionPath since we only want them to be
395
/// able to be constructed by calling our factory method or by going through
396
/// the append function.
397
- ProjectionPath(ProjectionPath &&Other) : Path(Other.Path) {}
+ ProjectionPath(ProjectionPath &&Other) : Path(std::move(Other.Path)) {}
398
399
/// Append the projection P onto this.
400
ProjectionPath &append(const Projection &P) {
@@ -411,8 +411,7 @@ class ProjectionPath {
411
}
412
413
ProjectionPath &operator=(ProjectionPath &&O) {
414
- *this = std::move(O);
415
- O.Path.clear();
+ std::swap(Path, O.Path);
416
return *this;
417
418
0 commit comments