Skip to content

Commit

Permalink
PR review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ajtribick committed Nov 1, 2023
1 parent 4597a10 commit 56a371d
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 178 deletions.
7 changes: 2 additions & 5 deletions src/celengine/simulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,9 @@ const Observer& Simulation::getObserver() const
}



Observer* Simulation::addObserver()
Observer* Simulation::duplicateActiveObserver()
{
Observer* o = new Observer();
observers.push_back(o);
return o;
return observers.emplace_back(new Observer(*getActiveObserver()));
}


Expand Down
2 changes: 1 addition & 1 deletion src/celengine/simulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Simulation
void setObserverOrientation(const Eigen::Quaternionf&);
void reverseObserverOrientation();

Observer* addObserver();
Observer* duplicateActiveObserver();
void removeObserver(Observer*);
Observer* getActiveObserver();
const Observer* getActiveObserver() const;
Expand Down
2 changes: 1 addition & 1 deletion src/celestia/celestiacore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1962,7 +1962,7 @@ void CelestiaCore::draw()
nFrames++;
if (nFrames == 100 || sysTime - fpsCounterStartTime > 10.0)
{
timeInfo.fps = (double) nFrames / (sysTime - fpsCounterStartTime);
timeInfo.fps = (float) nFrames / (sysTime - fpsCounterStartTime);
nFrames = 0;
fpsCounterStartTime = sysTime;
}
Expand Down
Loading

0 comments on commit 56a371d

Please sign in to comment.