1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-22 17:18:39 +00:00

C++11 cleanup on constructors (#6000)

* C++11 cleanup on constructors dir script
This commit is contained in:
Vincent Glize 2017-06-19 23:54:58 +02:00 committed by Loïc Blot
parent 4a78949083
commit 4a5e8ad343
40 changed files with 117 additions and 180 deletions

View file

@ -27,7 +27,6 @@ TimeTaker::TimeTaker(const std::string &name, u64 *result, TimePrecision prec)
{
m_name = name;
m_result = result;
m_running = true;
m_precision = prec;
m_time1 = porting::getTime(prec);
}
@ -36,7 +35,7 @@ u64 TimeTaker::stop(bool quiet)
{
if (m_running) {
u64 dtime = porting::getTime(m_precision) - m_time1;
if (m_result != NULL) {
if (m_result != nullptr) {
(*m_result) += dtime;
} else {
if (!quiet) {