mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Renamed some things.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
@@ -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)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
namespace love
|
||||
{
|
||||
|
||||
void delay(unsigned int ms)
|
||||
void sleep(unsigned int ms)
|
||||
{
|
||||
SDL_Delay(ms);
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
namespace love
|
||||
{
|
||||
|
||||
void delay(unsigned int ms);
|
||||
void sleep(unsigned int ms);
|
||||
|
||||
} // namespace love
|
||||
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user