This removes some redundancy
Also move the static functions in main.cpp in to an ananymous namespace.
Remove the old way of the realTimeSinceLastFrame calculation.
Details
Details
- Reviewers
vladislavbelov
Run visual and non visual mode.
Run with and without rlInterface
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 22851 Build 56075: Vulcan Build Build 56074: Vulcan Build (macOS) Build 56073: Vulcan Build (Windows)
Event Timeline
source/main.cpp | ||
---|---|---|
365 | Without reading the code it's impossible to guess what the function does based on the name, also breaks intent if called from anywhere else or more than once per "frame" |
source/main.cpp | ||
---|---|---|
365 | Do you suggest to change the name? What name do you suggest? |
source/main.cpp | ||
---|---|---|
365 | The function returns realTimeSinceLastFrame, so maybe calculateRealTimeSinceLastFrame? As it's a "static" function probably a comment is good enough, tho keeping it inside of Frame works for me as well. |