Skip to content

Commit

Permalink
Remove unnecessary casts for types that were not found
Browse files Browse the repository at this point in the history
  • Loading branch information
vbieleny committed Aug 29, 2021
1 parent 29eec60 commit cf65505
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/MaxRectsBinPackTest.cpp
@@ -1,3 +1,4 @@
#include <cstdio>
#include <stdint.h>

#if defined(__unix__) || defined(__APPLE__) || defined (__CYGWIN__)
Expand Down Expand Up @@ -31,13 +32,13 @@ uint64_t tick()
#elif defined(_POSIX_MONOTONIC_CLOCK)
timespec t;
clock_gettime(CLOCK_MONOTONIC, &t);
return (tick_t)t.tv_sec * 1000 * 1000 * 1000 + (tick_t)t.tv_nsec;
return t.tv_sec * 1000 * 1000 * 1000 + t.tv_nsec;
#elif defined(_POSIX_C_SOURCE)
timeval t;
gettimeofday(&t, NULL);
return (tick_t)t.tv_sec * 1000 * 1000 + (tick_t)t.tv_usec;
return t.tv_sec * 1000 * 1000 + t.tv_usec;
#else
return (tick_t)clock();
return clock();
#endif
}

Expand Down

0 comments on commit cf65505

Please sign in to comment.