Replace more Move/Forward with STL variants.

This commit is contained in:
David Anderson
2020-05-19 12:56:28 -07:00
parent 7a3e4054c7
commit 301bafa3f5
11 changed files with 28 additions and 23 deletions
+3 -1
View File
@@ -27,6 +27,8 @@
#ifndef _include_sourcemod_reentrant_iterator_h_
#define _include_sourcemod_reentrant_iterator_h_
#include <utility>
#include <amtl/am-linkedlist.h>
#include <amtl/am-function.h>
@@ -148,7 +150,7 @@ public:
template <typename U>
void insertBefore(iterator& where, U &&obj) {
BaseType::insertBefore(where.impl_, ke::Forward<U>(obj));
BaseType::insertBefore(where.impl_, std::forward<U>(obj));
}
template <typename U>
+6 -4
View File
@@ -44,11 +44,13 @@
* NameHashSet instead.
*/
#include <string.h>
#include <utility>
#include <am-allocator-policies.h>
#include <am-hashmap.h>
#include <am-string.h>
#include <am-moveable.h>
#include <string.h>
namespace SourceMod
{
@@ -163,7 +165,7 @@ public:
if (!internal_.add(i, aKey))
return false;
}
i->value = ke::Forward<UV>(value);
i->value = std::forward<UV>(value);
return true;
}
@@ -174,7 +176,7 @@ public:
Insert i = internal_.findForAdd(key);
if (i.found())
return false;
if (!internal_.add(i, aKey, ke::Forward<UV>(value)))
if (!internal_.add(i, aKey, std::forward<UV>(value)))
return false;
memory_used_ += key.length() + 1;
return true;