mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 11:55:31 +02:00
fixed typo
This commit is contained in:
parent
8b1cdb03cc
commit
b998008f01
1 changed files with 27 additions and 31 deletions
|
@ -40,7 +40,7 @@ void platform::destroy() {
|
|||
}
|
||||
|
||||
json Instance::getCPU(int index) {
|
||||
assert(index < _processor.size());
|
||||
assert(index < _cpu.size());
|
||||
|
||||
json result;
|
||||
if (index >= _cpu.size())
|
||||
|
@ -83,40 +83,36 @@ json Instance::getDisplay(int index) {
|
|||
}
|
||||
|
||||
Instance::~Instance() {
|
||||
if (_cpu.size() > 0) {
|
||||
|
||||
for (std::vector<json*>::iterator it = _cpu.begin(); it != _cpu.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
|
||||
_cpu.clear();
|
||||
|
||||
}
|
||||
|
||||
if (_memory.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _memory.begin(); it != _memory.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
|
||||
_memory.clear();
|
||||
}
|
||||
if (_cpu.size() > 0) {
|
||||
|
||||
for (std::vector<json*>::iterator it = _cpu.begin(); it != _cpu.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
_cpu.clear();
|
||||
}
|
||||
|
||||
if (_memory.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _memory.begin(); it != _memory.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
_memory.clear();
|
||||
}
|
||||
|
||||
|
||||
if (_gpu.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _gpu.begin(); it != _gpu.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
if (_gpu.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _gpu.begin(); it != _gpu.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
_gpu.clear();
|
||||
}
|
||||
|
||||
_gpu.clear();
|
||||
}
|
||||
if (_display.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _display.begin(); it != _display.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
|
||||
if (_display.size() > 0) {
|
||||
for (std::vector<json*>::iterator it = _display.begin(); it != _display.end(); ++it) {
|
||||
delete (*it);
|
||||
}
|
||||
|
||||
_display.clear();
|
||||
}
|
||||
_display.clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool platform::enumeratePlatform() {
|
||||
|
|
Loading…
Reference in a new issue