Use MOZ_DELETE on the copy/assignment operators for various hash classes. No bug, r=lumpy

--HG--
extra : rebase_source : f9fb08566c17f62c189b1469e3730554b6fbe1ce
This commit is contained in:
Jeff Walden 2012-09-10 13:27:04 -07:00
parent f7d62e2bcd
commit 736d91284b

View File

@ -8,6 +8,8 @@
#ifndef jshashtable_h_
#define jshashtable_h_
#include "mozilla/Attributes.h"
#include "TemplateLib.h"
#include "Utility.h"
@ -1012,10 +1014,6 @@ class HashMap
friend class Impl::Enum;
/* Not implicitly copyable (expensive). May add explicit |clone| later. */
HashMap(const HashMap &);
HashMap &operator=(const HashMap &);
Impl impl;
public:
@ -1217,6 +1215,11 @@ class HashMap
if (Ptr p = lookup(l))
remove(p);
}
private:
/* Not implicitly copyable (expensive). May add explicit |clone| later. */
HashMap(const HashMap &hm) MOZ_DELETE;
HashMap &operator=(const HashMap &hm) MOZ_DELETE;
};
/*
@ -1250,10 +1253,6 @@ class HashSet
friend class Impl::Enum;
/* Not implicitly copyable (expensive). May add explicit |clone| later. */
HashSet(const HashSet &);
HashSet &operator=(const HashSet &);
Impl impl;
public:
@ -1417,6 +1416,11 @@ class HashSet
if (Ptr p = lookup(l))
remove(p);
}
private:
/* Not implicitly copyable (expensive). May add explicit |clone| later. */
HashSet(const HashSet &hs) MOZ_DELETE;
HashSet &operator=(const HashSet &hs) MOZ_DELETE;
};
} /* namespace js */