Renamed some things.

This commit is contained in:
Alex Szpakowski
2016-02-18 22:11:41 -04:00
parent bd93f0dfef
commit cf4b409302
17 changed files with 43 additions and 50 deletions
+3 -2
View File
@@ -19,12 +19,13 @@
**/
#include "Memoizer.h"
#include <cstddef>
#include <unordered_map>
namespace love
{
std::map<void *, void *> Memoizer::objectMap;
static std::unordered_map<void *, void *> objectMap;
void Memoizer::add(void *key, void *val)
{
-7
View File
@@ -21,8 +21,6 @@
#ifndef LOVE_MEMOIZER_H
#define LOVE_MEMOIZER_H
#include <map>
namespace love
{
@@ -31,14 +29,9 @@ class Memoizer
public:
static void add(void *key, void *val);
static void remove(void *key);
static void *find(void *key);
private:
static std::map<void *, void *> objectMap;
}; // Memoizer
} // love
+1 -1
View File
@@ -148,7 +148,7 @@
#endif
// Check we have a sane configuration
#if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOSX)
#if !defined(LOVE_WINDOWS) && !defined(LOVE_LINUX) && !defined(LOVE_IOS) && !defined(LOVE_MACOSX) && !defined(LOVE_ANDROID)
# error Could not detect target platform
#endif
#if !defined(LOVE_LITTLE_ENDIAN) && !defined(LOVE_BIG_ENDIAN)
+1 -1
View File
@@ -25,7 +25,7 @@
namespace love
{
void delay(unsigned int ms)
void sleep(unsigned int ms)
{
SDL_Delay(ms);
}
+1 -1
View File
@@ -24,7 +24,7 @@
namespace love
{
void delay(unsigned int ms);
void sleep(unsigned int ms);
} // namespace love
+3 -3
View File
@@ -76,7 +76,7 @@ struct Triangle
Vertex a, b, c;
};
inline int next_p2(int x)
inline int nextP2(int x)
{
x += (x == 0);
x--;
@@ -84,9 +84,9 @@ inline int next_p2(int x)
return ++x;
}
inline float next_p2(float x)
inline float nextP2(float x)
{
return static_cast<float>(next_p2(static_cast<int>(x)));
return (float) nextP2((int) x);
}
} // love