mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02:00
C++11 cleanup on constructors (#6000)
* C++11 cleanup on constructors dir script
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user