Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged SmallVector now requires that items be default constructible This isn't an issue since some contained items were previously created uninitialized. Temporary default constructors are added to the following structs - SmallPair - SmallStackItem - GRFPresence Where vector<bool> is required, transition immediately to std::vector to avoid returning proxy object references.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace SQConvert {
|
||||
struct SQAutoFreePointers : SmallVector<void *, 1> {
|
||||
~SQAutoFreePointers()
|
||||
{
|
||||
for (uint i = 0; i < this->items; i++) free(this->data[i]);
|
||||
for (uint i = 0; i < std::vector<void *>::size(); i++) free(std::vector<void *>::operator[](i));
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user