fixed typo

This commit is contained in:
amerhifi 2019-05-09 14:43:27 -07:00
parent 8b1cdb03cc
commit b998008f01

View file

@ -40,7 +40,7 @@ void platform::destroy() {
} }
json Instance::getCPU(int index) { json Instance::getCPU(int index) {
assert(index < _processor.size()); assert(index < _cpu.size());
json result; json result;
if (index >= _cpu.size()) if (index >= _cpu.size())
@ -88,16 +88,13 @@ Instance::~Instance() {
for (std::vector<json*>::iterator it = _cpu.begin(); it != _cpu.end(); ++it) { for (std::vector<json*>::iterator it = _cpu.begin(); it != _cpu.end(); ++it) {
delete (*it); delete (*it);
} }
_cpu.clear(); _cpu.clear();
} }
if (_memory.size() > 0) { if (_memory.size() > 0) {
for (std::vector<json*>::iterator it = _memory.begin(); it != _memory.end(); ++it) { for (std::vector<json*>::iterator it = _memory.begin(); it != _memory.end(); ++it) {
delete (*it); delete (*it);
} }
_memory.clear(); _memory.clear();
} }
@ -106,7 +103,6 @@ Instance::~Instance() {
for (std::vector<json*>::iterator it = _gpu.begin(); it != _gpu.end(); ++it) { for (std::vector<json*>::iterator it = _gpu.begin(); it != _gpu.end(); ++it) {
delete (*it); delete (*it);
} }
_gpu.clear(); _gpu.clear();
} }