Reduce unnecessary uses of std::list
This commit is contained in:
10
pyc_module.h
10
pyc_module.h
@@ -2,7 +2,7 @@
|
||||
#define _PYC_MODULE_H
|
||||
|
||||
#include "pyc_code.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
enum PycMagic {
|
||||
MAGIC_1_0 = 0x00999902,
|
||||
@@ -64,10 +64,10 @@ public:
|
||||
|
||||
PycRef<PycCode> code() const { return m_code; }
|
||||
|
||||
void intern(PycRef<PycString> str) { m_interns.push_back(str); }
|
||||
void intern(PycRef<PycString> str) { m_interns.emplace_back(std::move(str)); }
|
||||
PycRef<PycString> getIntern(int ref) const;
|
||||
|
||||
void refObject(PycRef<PycObject> str) { m_refs.push_back(str); }
|
||||
void refObject(PycRef<PycObject> obj) { m_refs.emplace_back(std::move(obj)); }
|
||||
PycRef<PycObject> getRef(int ref) const;
|
||||
|
||||
static bool isSupportedVersion(int major, int minor);
|
||||
@@ -80,8 +80,8 @@ private:
|
||||
bool m_unicode;
|
||||
|
||||
PycRef<PycCode> m_code;
|
||||
std::list<PycRef<PycString> > m_interns;
|
||||
std::list<PycRef<PycObject> > m_refs;
|
||||
std::vector<PycRef<PycString>> m_interns;
|
||||
std::vector<PycRef<PycObject>> m_refs;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user