Remove a few outdated windows-only preprocessor hacks
This commit is contained in:
parent
9605e0fcb9
commit
374209eebe
@ -321,7 +321,7 @@ else
|
||||
endif
|
||||
|
||||
if host_platform == 'windows'
|
||||
args_ccomp_win = [ '-D_WIN32_WINNT=0x0501' ]
|
||||
args_ccomp_win = [ '-D_WIN32_WINNT=0x0501', '-DNOMINMAX' ]
|
||||
windows_mod = import('windows')
|
||||
if is_static
|
||||
args_ccomp_win += [ '-DCURL_STATICLIB' ]
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "Misc.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "common/String.h"
|
||||
#include <cstring>
|
||||
#include <sys/types.h>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
void HSV_to_RGB(int h,int s,int v,int *r,int *g,int *b)//convert 0-255(0-360 for H) HSV values to 0-255 RGB
|
||||
{
|
||||
|
@ -19,7 +19,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "common/tpt-inline.h"
|
||||
#include <ctime>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@ -1183,7 +1182,7 @@ bson_bool_t bson_check_string( bson *b, const char *string,
|
||||
#define bson_big_endian32(out, in) ( bson_swap_endian32(out, in) )
|
||||
//#endif
|
||||
|
||||
static TPT_INLINE void bson_swap_endian64( void *outp, const void *inp ) {
|
||||
static inline void bson_swap_endian64( void *outp, const void *inp ) {
|
||||
const char *in = ( const char * )inp;
|
||||
char *out = ( char * )outp;
|
||||
|
||||
@ -1197,7 +1196,7 @@ static TPT_INLINE void bson_swap_endian64( void *outp, const void *inp ) {
|
||||
out[7] = in[0];
|
||||
|
||||
}
|
||||
static TPT_INLINE void bson_swap_endian32( void *outp, const void *inp ) {
|
||||
static inline void bson_swap_endian32( void *outp, const void *inp ) {
|
||||
const char *in = ( const char * )inp;
|
||||
char *out = ( char * )outp;
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
#include "Format.h"
|
||||
#include "simulation/Simulation.h"
|
||||
#include "simulation/ElementClasses.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "common/tpt-compat.h"
|
||||
#include "bson/BSON.h"
|
||||
#include "graphics/Renderer.h"
|
||||
@ -14,6 +13,7 @@
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
|
||||
static void ConvertJsonToBson(bson *b, Json::Value j, int depth = 0);
|
||||
static void ConvertBsonToJson(bson_iterator *b, Json::Value *j, int depth = 0);
|
||||
|
@ -4,10 +4,6 @@
|
||||
#include <memory>
|
||||
#include <ctime>
|
||||
|
||||
#ifdef GetUserName
|
||||
# undef GetUserName // dammit windows
|
||||
#endif
|
||||
|
||||
class GameSave;
|
||||
|
||||
class SaveInfo
|
||||
|
@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
@ -1,9 +1,6 @@
|
||||
#include "Platform.h"
|
||||
#include "resource.h"
|
||||
#include "Config.h"
|
||||
#ifndef NOMINMAX
|
||||
# define NOMINMAX
|
||||
#endif
|
||||
#include <iostream>
|
||||
#include <sys/stat.h>
|
||||
#include <io.h>
|
||||
|
@ -29,9 +29,3 @@ constexpr double TPT_PI_DBL = double(M_PI);
|
||||
constexpr float TPT_PI_FLT = 3.14159265f;
|
||||
constexpr double TPT_PI_DBL = 3.14159265358979323846;
|
||||
#endif
|
||||
|
||||
typedef unsigned short Uint16;
|
||||
|
||||
#ifndef NULL
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# define TPT_INLINE _inline
|
||||
#else
|
||||
# define TPT_INLINE inline
|
||||
#endif
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# define NOMINMAX
|
||||
# ifdef min
|
||||
# undef min
|
||||
# endif
|
||||
# ifdef max
|
||||
# undef max
|
||||
# endif
|
||||
#endif
|
@ -4,7 +4,6 @@
|
||||
#include <vector>
|
||||
#include "common/Plane.h"
|
||||
#include "common/String.h"
|
||||
#include "common/tpt-inline.h"
|
||||
#include "Icons.h"
|
||||
#include "Pixel.h"
|
||||
#include "RasterDrawMethods.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "BitmapBrush.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "Misc.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
BitmapBrush::BitmapBrush(ui::Point inputSize, unsigned char const *inputBitmap)
|
||||
|
@ -65,10 +65,6 @@
|
||||
#include <SDL.h>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef GetUserName
|
||||
# undef GetUserName // dammit windows
|
||||
#endif
|
||||
|
||||
GameController::GameController():
|
||||
firstTick(true),
|
||||
foundSignID(-1),
|
||||
|
@ -40,10 +40,6 @@
|
||||
#include <iostream>
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef GetUserName
|
||||
# undef GetUserName // dammit windows
|
||||
#endif
|
||||
|
||||
class SplitButton : public ui::Button
|
||||
{
|
||||
bool rightDown;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "ContextMenu.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "SimulationConfig.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ui;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include "gui/Style.h"
|
||||
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ui;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "graphics/Graphics.h"
|
||||
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ui;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "Controller.h"
|
||||
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
LocalBrowserController::LocalBrowserController(std::function<void ()> onDone_):
|
||||
HasDone(false)
|
||||
|
@ -32,10 +32,6 @@
|
||||
#include "SimulationConfig.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef GetUserName
|
||||
# undef GetUserName // dammit windows
|
||||
#endif
|
||||
|
||||
PreviewView::PreviewView(std::unique_ptr<VideoBuffer> newSavePreview):
|
||||
ui::Window(ui::Point(-1, -1), ui::Point((XRES/2)+210, (YRES/2)+150)),
|
||||
submitCommentButton(NULL),
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "client/http/SearchSavesRequest.h"
|
||||
#include "client/http/SearchTagsRequest.h"
|
||||
#include "common/platform/Platform.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "graphics/Graphics.h"
|
||||
#include "tasks/Task.h"
|
||||
#include "tasks/TaskWindow.h"
|
||||
@ -23,6 +22,7 @@
|
||||
#include "gui/preview/PreviewController.h"
|
||||
#include "gui/preview/PreviewView.h"
|
||||
#include "SimulationConfig.h"
|
||||
#include <algorithm>
|
||||
|
||||
SearchController::SearchController(std::function<void ()> onDone_):
|
||||
activePreview(NULL),
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "client/Client.h"
|
||||
#include "client/http/SearchSavesRequest.h"
|
||||
#include "client/http/SearchTagsRequest.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include <cmath>
|
||||
|
||||
|
@ -14,10 +14,6 @@
|
||||
#include "SimulationConfig.h"
|
||||
#include <SDL.h>
|
||||
|
||||
#ifdef GetUserName
|
||||
# undef GetUserName // dammit windows
|
||||
#endif
|
||||
|
||||
SearchView::SearchView():
|
||||
ui::Window(ui::Point(0, 0), ui::Point(WINDOWW, WINDOWH)),
|
||||
c(NULL),
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
static inline int resampler_range_check(int v, int h) { (void)h; resampler_assert((v >= 0) && (v < h)); return v; }
|
||||
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE (1)
|
||||
|
@ -3,13 +3,13 @@
|
||||
#include "Misc.h"
|
||||
#include "common/tpt-rand.h"
|
||||
#include "common/tpt-compat.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "ElementDefs.h"
|
||||
#include "ElementClasses.h"
|
||||
#include "Particle.h"
|
||||
#include "ElementGraphics.h"
|
||||
#include "Simulation.h"
|
||||
#include "graphics/Renderer.h"
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
constexpr float IPL = MIN_PRESSURE - 1;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "SnapshotDelta.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
// * A SnapshotDelta is a bidirectional difference type between Snapshots, defined such
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
int Element_FIRE_update(UPDATE_FUNC_ARGS);
|
||||
static int updateLegacy(UPDATE_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
struct StackData;
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "common/tpt-minmax.h"
|
||||
#include "simulation/ElementCommon.h"
|
||||
#include <algorithm>
|
||||
|
||||
static int update(UPDATE_FUNC_ARGS);
|
||||
static int graphics(GRAPHICS_FUNC_ARGS);
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include "graphics/Graphics.h"
|
||||
|
||||
#include "common/tpt-minmax.h"
|
||||
#include <algorithm>
|
||||
|
||||
TaskWindow::TaskWindow(String title_, Task * task_, bool closeOnDone):
|
||||
ui::Window(ui::Point(-1, -1), ui::Point(240, 60)),
|
||||
|
Reference in New Issue
Block a user