Closed Jerboa-app closed 11 months ago
The offending code.
No return statement on sRender::draw leads to the program skipping into the next function body, sRender::update
Absolutely blinding
double sRender::draw ( EntityComponentSystem * ecs, AbstractWorld * world ) { if (ecs != nullptr) { sSpriteRender & sprite = ecs->getSystem<sSpriteRender>(); update(ecs); sprite.draw(&shaderPool); } if (world != nullptr) { world->draw(*(shaderPool.get("worldShader").get())); } auto t = std::chrono::high_resolution_clock::now(); accumulatedTime += std::chrono::duration_cast<duration<double>>(t-clock).count(); clock = t; /* return accumulatedTime; */ } void sRender::update(EntityComponentSystem * ecs) { sSpriteRender & sprite = ecs->getSystem<sSpriteRender>(); sprite.update(ecs, &shaderPool, staleShaders); staleShaders = false; }
Excellent since it was took a while to spot in even going full gdb - although there was a warning!
The offending code.
No return statement on sRender::draw leads to the program skipping into the next function body, sRender::update
Absolutely blinding