mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-04 14:09:47 +03:00
Mac OS X 10.6 & More C++03 Support (#68)
* Mac OS X 10.6 & More C++03 Support * Fix SDL2 options.txt loading for C++03 --------- Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
#include "CThread.hpp"
|
||||
#include "common/Utils.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
********************************************************************/
|
||||
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Mth.hpp"
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
********************************************************************/
|
||||
|
||||
#include "Random.hpp"
|
||||
#include "common/Utils.hpp"
|
||||
|
||||
/* Period parameters */
|
||||
#define N 624
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <stdint.h>
|
||||
#include "LongHack.hpp"
|
||||
#include "common/Utils.hpp"
|
||||
|
||||
// This appears to be VERY similar to https://github.com/SethRobinson/proton/blob/master/shared/util/CRandom.h#L10
|
||||
// It turns out, RTsoft, Mojang, and the author of Game Coding Complete used the same reference implementation of
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
template<typename T>
|
||||
static bool remove(std::vector<T>& vec, const T& t)
|
||||
{
|
||||
auto iter = std::find(vec.begin(), vec.end(), t);
|
||||
typename std::vector<T>::iterator iter = std::find(vec.begin(), vec.end(), t);
|
||||
if (iter == vec.end())
|
||||
return false;
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
{
|
||||
int removed = 0;
|
||||
|
||||
for (auto it = toRemove.begin(); it != toRemove.end(); it++)
|
||||
for (typename std::vector<T>::const_iterator it = toRemove.begin(); it != toRemove.end(); it++)
|
||||
{
|
||||
T rem = *it;
|
||||
|
||||
|
||||
@@ -21,9 +21,12 @@
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
|
||||
#ifdef USE_OLD_CPP
|
||||
#define constexpr const
|
||||
#define nullptr NULL
|
||||
#define override
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
@@ -579,6 +582,9 @@ struct TilePos : Pos
|
||||
#define SAFE_DELETE(ptr) do { if (ptr) delete ptr; } while (0)
|
||||
#define SAFE_DELETE_ARRAY(ptr) do { if (ptr) delete[] ptr; } while (0)
|
||||
|
||||
#define SSTR( x ) static_cast< std::ostringstream & >( \
|
||||
( std::ostringstream() << std::dec << x ) ).str()
|
||||
|
||||
typedef uint8_t TileID;
|
||||
|
||||
// functions from Mojang
|
||||
|
||||
Reference in New Issue
Block a user