mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Code modernization: src/p*, src/q*, src/r*, src/s* (partial) (#6282)
* Code modernization: src/p*, src/q*, src/r*, src/s* (partial) * empty function * default constructor/destructor * for range-based loops * use emplace_back instead of push_back * C++ STL header style * Spelling: vertice -> vertex
This commit is contained in:
@@ -56,7 +56,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#define sleep_ms(x) Sleep(x)
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <stdint.h> //for uintptr_t
|
||||
#include <cstdint> //for uintptr_t
|
||||
|
||||
// Use standard Posix macro for Linux
|
||||
#if (defined(linux) || defined(__linux)) && !defined(__linux__)
|
||||
@@ -112,8 +112,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#ifndef _WIN32 // Posix
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#if defined(__MACH__) && defined(__APPLE__)
|
||||
#include <ctime>
|
||||
|
||||
#if defined(__MACH__) && defined(__APPLE__)
|
||||
#include <mach/clock.h>
|
||||
#include <mach/mach.h>
|
||||
#endif
|
||||
@@ -273,9 +274,9 @@ inline u64 getDeltaMs(u64 old_time_ms, u64 new_time_ms)
|
||||
{
|
||||
if (new_time_ms >= old_time_ms) {
|
||||
return (new_time_ms - old_time_ms);
|
||||
} else {
|
||||
return (old_time_ms - new_time_ms);
|
||||
}
|
||||
|
||||
return (old_time_ms - new_time_ms);
|
||||
}
|
||||
|
||||
inline const char *getPlatformName()
|
||||
|
Reference in New Issue
Block a user