Skip to content

Commit a078e81

Browse files
ribbon-otterribbon-otter
andauthored
remove std::move where clang warns of pessimizing-move (#3080)
Co-authored-by: ribbon-otter <[email protected]>
1 parent e529d2a commit a078e81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dlib/any/any.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ namespace dlib
3939
if (contains<T_>())
4040
storage.unsafe_get<T_>() = std::forward<T>(item);
4141
else
42-
*this = std::move(any{std::forward<T>(item)});
42+
*this = any{std::forward<T>(item)};
4343
return *this;
4444
}
4545

dlib/any/storage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ namespace dlib
248248
!*/
249249
{
250250
if (this != &other)
251-
*this = std::move(storage_heap{other});
251+
*this = storage_heap{other};
252252
return *this;
253253
}
254254

0 commit comments

Comments
 (0)