util/HugeAllocator: import std::swap()

This commit is contained in:
Max Kellermann 2019-05-08 22:33:41 +02:00
parent 2c6dd04d19
commit 98e6a861ca
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2017 Max Kellermann <max.kellermann@gmail.com>
* Copyright 2013-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2013-2017 Max Kellermann <max.kellermann@gmail.com>
* Copyright 2013-2019 Max Kellermann <max.kellermann@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -164,7 +164,8 @@ public:
}
HugeArray &operator=(HugeArray &&other) noexcept {
std::swap(buffer, other.buffer);
using std::swap;
swap(buffer, other.buffer);
return *this;
}