diff --git a/toonz/sources/common/psdlib/psd.cpp b/toonz/sources/common/psdlib/psd.cpp index 10db96c..9ec24de 100644 --- a/toonz/sources/common/psdlib/psd.cpp +++ b/toonz/sources/common/psdlib/psd.cpp @@ -1,6 +1,6 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #endif diff --git a/toonz/sources/common/psdlib/psdutils.cpp b/toonz/sources/common/psdlib/psdutils.cpp index 13eae17..059bfc9 100644 --- a/toonz/sources/common/psdlib/psdutils.cpp +++ b/toonz/sources/common/psdlib/psdutils.cpp @@ -1,6 +1,4 @@ - - -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #endif diff --git a/toonz/sources/common/tapptools/ttimer.cpp b/toonz/sources/common/tapptools/ttimer.cpp index 2726164..033e99b 100644 --- a/toonz/sources/common/tapptools/ttimer.cpp +++ b/toonz/sources/common/tapptools/ttimer.cpp @@ -187,7 +187,7 @@ Uint32 ElapsedTimeCB(Uint32 interval, void *param) { } } -#elif __sgi +#elif defined(__sgi) class TTimer::Imp { public: Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) @@ -219,7 +219,7 @@ public: TGenericTimerAction *m_action; }; -#elif MACOSX +#elif defined(MACOSX) class TTimer::Imp { public: Imp(std::string name, UINT timerRes, TTimer::Type type, TTimer *timer) diff --git a/toonz/sources/common/tgl/tgl.cpp b/toonz/sources/common/tgl/tgl.cpp index 1cc7d2b..c4bcd70 100644 --- a/toonz/sources/common/tgl/tgl.cpp +++ b/toonz/sources/common/tgl/tgl.cpp @@ -474,13 +474,13 @@ void tglDraw(const TRectD &rect, const TRaster32P &tex, bool blending) { } else texture = tex; GLenum fmt = -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) GL_BGRA_EXT; -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) GL_ABGR_EXT; -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) GL_RGBA; -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) GL_BGRA; #else // Error PLATFORM NOT SUPPORTED diff --git a/toonz/sources/common/tipc/tipc.cpp b/toonz/sources/common/tipc/tipc.cpp index 93f77de..e379a9d 100644 --- a/toonz/sources/common/tipc/tipc.cpp +++ b/toonz/sources/common/tipc/tipc.cpp @@ -13,12 +13,12 @@ #include // System-specific includes -#ifdef _WIN32 +#if defined(_WIN32) #include -#elif MACOSX +#elif defined(MACOSX) #include #include -#elif LINUX +#elif defined(LINUX) #include #include #endif diff --git a/toonz/sources/common/tvectorimage/outlineApproximation.h b/toonz/sources/common/tvectorimage/outlineApproximation.h index b17a690..dc6d895 100644 --- a/toonz/sources/common/tvectorimage/outlineApproximation.h +++ b/toonz/sources/common/tvectorimage/outlineApproximation.h @@ -7,7 +7,7 @@ #if !defined(OUTLINEAPPROXIMATION_H) #define OUTLINEAPPROXIMATION_H -#if _MSC_VER > 1000 +#if defined(_MSC_VER) && (_MSC_VER > 1000) #pragma once #endif // _MSC_VER > 1000 diff --git a/toonz/sources/common/tvectorimage/tstroke.cpp b/toonz/sources/common/tvectorimage/tstroke.cpp index fda300f..6939e5e 100644 --- a/toonz/sources/common/tvectorimage/tstroke.cpp +++ b/toonz/sources/common/tvectorimage/tstroke.cpp @@ -1797,7 +1797,7 @@ void TStroke::reduceControlPoints(double error, vector corners) { } controlPoints.push_back(m_imp->m_centerLineArray.back()->getThickP2()); -#if _DEBUG +#ifdef _DEBUG cpSize = controlPoints.size(); for (cp = 1; cp < cpSize; cp++) assert(!(controlPoints[cp - 1] == controlPoints[cp])); @@ -2341,7 +2341,7 @@ void TStroke::draw(const TVectorRenderData &rd) const //----------------------------------------------------------------------------- TStrokeProp *TStroke::getProp() const { -#if DISEGNO_OUTLINE == 0 +#if !defined(DISEGNO_OUTLINE) if (!m_imp->m_styleId) return 0; #endif diff --git a/toonz/sources/common/tvrender/qtofflinegl.cpp b/toonz/sources/common/tvrender/qtofflinegl.cpp index f9581f0..0ef487e 100644 --- a/toonz/sources/common/tvrender/qtofflinegl.cpp +++ b/toonz/sources/common/tvrender/qtofflinegl.cpp @@ -127,7 +127,7 @@ void QtOfflineGL::createContext(TDimension rasterSize, QGLFormat fmt; -#ifdef _WIN32 +#if defined(_WIN32) fmt.setAlphaBufferSize(8); fmt.setAlpha(true); fmt.setRgba(true); @@ -137,7 +137,7 @@ void QtOfflineGL::createContext(TDimension rasterSize, fmt.setStencil(true); fmt.setAccum(false); fmt.setPlane(0); -#elif MACOSX +#elif defined(MACOSX) fmt = QGLFormat::defaultFormat(); // printf("GL Version: %s\n",glGetString(GL_VERSION)); fmt.setVersion(2, 1); /* OSX10.8 では 3.2 だめかも */ @@ -153,7 +153,7 @@ void QtOfflineGL::createContext(TDimension rasterSize, fmt.setPlane(0); fmt.setDirectRendering(false); #endif -#elif LINUX +#elif defined(LINUX) fmt = QGLFormat::defaultFormat(); // printf("GL Version: %s\n",glGetString(GL_VERSION)); fmt.setVersion(2, 1); /* XXX? */ @@ -279,7 +279,7 @@ SPECIFICHE MAC = depth_size 24, stencil_size 8, alpha_size 1 QGLFormat fmt; -#ifdef _WIN32 +#ifdef defined(_WIN32) fmt.setAlphaBufferSize(8); fmt.setAlpha(false); fmt.setRgba(true); @@ -289,7 +289,7 @@ SPECIFICHE MAC = depth_size 24, stencil_size 8, alpha_size 1 fmt.setStencil(true); fmt.setAccum(false); fmt.setPlane(0); -#elif MACOSX +#elif defined(MACOSX) fmt.setAlphaBufferSize(1); fmt.setAlpha(false); fmt.setRgba(true); @@ -299,7 +299,7 @@ SPECIFICHE MAC = depth_size 24, stencil_size 8, alpha_size 1 fmt.setStencil(true); fmt.setAccum(false); fmt.setPlane(0); -#elif LINUX +#elif defined(LINUX) fmt.setAlphaBufferSize(1); fmt.setAlpha(false); fmt.setRgba(true); diff --git a/toonz/sources/common/tvrender/tofflinegl.cpp b/toonz/sources/common/tvrender/tofflinegl.cpp index 70eadb0..eaab4d9 100644 --- a/toonz/sources/common/tvrender/tofflinegl.cpp +++ b/toonz/sources/common/tvrender/tofflinegl.cpp @@ -19,7 +19,7 @@ #include "tthread.h" -#elif MACOSX +#elif defined(MACOSX) #include "qtofflinegl.h" @@ -490,7 +490,7 @@ std::shared_ptr defaultOfflineGLGenerator( return std::make_shared(dim, shared); } -#elif MACOSX +#elif defined(MACOSX) std::shared_ptr defaultOfflineGLGenerator( const TDimension &dim, std::shared_ptr shared) { diff --git a/toonz/sources/image/bmp/filebmp.h b/toonz/sources/image/bmp/filebmp.h index 63b7e53..7d5785c 100644 --- a/toonz/sources/image/bmp/filebmp.h +++ b/toonz/sources/image/bmp/filebmp.h @@ -7,7 +7,7 @@ extern "C" { #endif /* -#if defined(WIN32) +#if defined(_WIN32) typedef struct {unsigned char b,g,r,m;} LPIXEL; #elif defined(__sgi) typedef struct { unsigned char m,b,g,r; } LPIXEL; diff --git a/toonz/sources/image/png/tiio_png.cpp b/toonz/sources/image/png/tiio_png.cpp index 34193c1..dc40866 100644 --- a/toonz/sources/image/png/tiio_png.cpp +++ b/toonz/sources/image/png/tiio_png.cpp @@ -1,4 +1,4 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #endif diff --git a/toonz/sources/image/quantel/filequantel.c b/toonz/sources/image/quantel/filequantel.c index cc8f264..9159d14 100644 --- a/toonz/sources/image/quantel/filequantel.c +++ b/toonz/sources/image/quantel/filequantel.c @@ -1,6 +1,6 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/image/sgi/filesgi.cpp b/toonz/sources/image/sgi/filesgi.cpp index b91d7fa..23e23b5 100644 --- a/toonz/sources/image/sgi/filesgi.cpp +++ b/toonz/sources/image/sgi/filesgi.cpp @@ -1,6 +1,6 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/image/tga/tiio_tga.cpp b/toonz/sources/image/tga/tiio_tga.cpp index 949e3c7..d1f2647 100644 --- a/toonz/sources/image/tga/tiio_tga.cpp +++ b/toonz/sources/image/tga/tiio_tga.cpp @@ -1,6 +1,6 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #pragma warning(disable : 4996) #endif diff --git a/toonz/sources/image/tif/tiio_tif.cpp b/toonz/sources/image/tif/tiio_tif.cpp index 323f862..74f8869 100644 --- a/toonz/sources/image/tif/tiio_tif.cpp +++ b/toonz/sources/image/tif/tiio_tif.cpp @@ -1,9 +1,9 @@ -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #endif #define IS_TIFF_MAIN -#if _WIN32 +#if defined(_WIN32) #include #else #include diff --git a/toonz/sources/image/tiio.cpp b/toonz/sources/image/tiio.cpp index 336e6b0..e57669c 100644 --- a/toonz/sources/image/tiio.cpp +++ b/toonz/sources/image/tiio.cpp @@ -18,7 +18,7 @@ #include // Platform-specific includes -#ifdef _WIN32 +#if defined(_WIN32) #ifndef x64 @@ -37,11 +37,11 @@ #include "./3gp/tiio_3gp.h" #include "./zcc/tiio_zcc.h" -#elif MACOSX +#elif defined(MACOSX) #include "./mov/tiio_movM.h" #include "./3gp/tiio_3gpM.h" -#elif LINUX // No more supported by the way... +#elif defined(LINUX) // No more supported by the way... // #include "./mov/tiio_movL.h" #include "./mov/tiio_mov_proxy.h" #include "./3gp/tiio_3gp_proxy.h" diff --git a/toonz/sources/image/tzp/tmacro.h b/toonz/sources/image/tzp/tmacro.h index e4ac69c..683d44d 100644 --- a/toonz/sources/image/tzp/tmacro.h +++ b/toonz/sources/image/tzp/tmacro.h @@ -15,7 +15,7 @@ //#include "tmacroW.h" #endif -#if defined(DBMALLOC) && !defined(WIN32) +#if defined(DBMALLOC) && !defined(_WIN32) #include "dbmalloc.h" #endif @@ -126,7 +126,7 @@ static const char *const TALLOC_MSG_ = static const char *const TREALLOC_MSG_ = "Out of memory reallocating %d bytes (%s line %d)"; -#if defined(WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_DEBUG) #define WIN32_DBG_NBFL_ , _NORMAL_BLOCK, __FILE__, __LINE__ #define WIN32_DBG_NB_ , _NORMAL_BLOCK #define TMALLOC_FUN_ _malloc_dbg diff --git a/toonz/sources/include/tcg/hpp/triangulate.hpp b/toonz/sources/include/tcg/hpp/triangulate.hpp index f71f066..e778824 100644 --- a/toonz/sources/include/tcg/hpp/triangulate.hpp +++ b/toonz/sources/include/tcg/hpp/triangulate.hpp @@ -9,12 +9,12 @@ #include "../point_ops.h" // OS-specific includes -#ifdef WIN32 +#if defined(_WIN32) #include "windows.h" #include -#elif MACOSX +#elif defined(MACOSX) #include -#elif LINUX +#elif defined(LINUX) #include #include #endif diff --git a/toonz/sources/include/tgl.h b/toonz/sources/include/tgl.h index ad2a060..fa2cdcb 100644 --- a/toonz/sources/include/tgl.h +++ b/toonz/sources/include/tgl.h @@ -50,13 +50,13 @@ class TCubic; #endif #endif -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) #define TGL_FMT GL_BGRA_EXT -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) #define TGL_FMt GL_ABGR_EXT -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) #define TGL_FMT GL_RGBA -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) #define TGL_FMT GL_BGRA #else @undefined chan order diff --git a/toonz/sources/include/tmachine.h b/toonz/sources/include/tmachine.h index 49542e5..3e1266d 100644 --- a/toonz/sources/include/tmachine.h +++ b/toonz/sources/include/tmachine.h @@ -3,7 +3,7 @@ #ifndef T_MACHINE_INCLUDED #define T_MACHINE_INCLUDED -#if defined(WIN32) || defined(i386) +#if defined(_WIN32) || defined(i386) #define TNZ_LITTLE_ENDIAN 1 #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(__sgi) diff --git a/toonz/sources/include/toonz4.6/machine.h b/toonz/sources/include/toonz4.6/machine.h index 44209df..f2fe005 100644 --- a/toonz/sources/include/toonz4.6/machine.h +++ b/toonz/sources/include/toonz4.6/machine.h @@ -20,7 +20,7 @@ #endif */ -#if defined(WIN32) || defined(i386) +#if defined(_WIN32) || defined(i386) #define TNZ_LITTLE_ENDIAN 1 #define TNZ_MACHINE_CHANNEL_ORDER_BGRM 1 #elif defined(__sgi) diff --git a/toonz/sources/include/toonz4.6/pixel.h b/toonz/sources/include/toonz4.6/pixel.h index f218a7d..e9792cc 100644 --- a/toonz/sources/include/toonz4.6/pixel.h +++ b/toonz/sources/include/toonz4.6/pixel.h @@ -37,7 +37,7 @@ typedef struct _SPIXEL { unsigned short b, g, r, m; } SPIXEL; #define LPIXEL_B_SHIFT 24 #endif -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) typedef struct { unsigned char m, b, g, r; } LPIXEL; typedef struct { unsigned short m, b, g, r; } SPIXEL; diff --git a/toonz/sources/include/toonz4.6/tmacro.h b/toonz/sources/include/toonz4.6/tmacro.h index e4ac69c..683d44d 100644 --- a/toonz/sources/include/toonz4.6/tmacro.h +++ b/toonz/sources/include/toonz4.6/tmacro.h @@ -15,7 +15,7 @@ //#include "tmacroW.h" #endif -#if defined(DBMALLOC) && !defined(WIN32) +#if defined(DBMALLOC) && !defined(_WIN32) #include "dbmalloc.h" #endif @@ -126,7 +126,7 @@ static const char *const TALLOC_MSG_ = static const char *const TREALLOC_MSG_ = "Out of memory reallocating %d bytes (%s line %d)"; -#if defined(WIN32) && defined(_DEBUG) +#if defined(_WIN32) && defined(_DEBUG) #define WIN32_DBG_NBFL_ , _NORMAL_BLOCK, __FILE__, __LINE__ #define WIN32_DBG_NB_ , _NORMAL_BLOCK #define TMALLOC_FUN_ _malloc_dbg diff --git a/toonz/sources/include/tpixel.h b/toonz/sources/include/tpixel.h index f2ee611..017c8b8 100644 --- a/toonz/sources/include/tpixel.h +++ b/toonz/sources/include/tpixel.h @@ -47,11 +47,11 @@ public: static const int maxChannelValue; typedef unsigned char Channel; -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) Channel b, g, r, m; -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) Channel m, b, g, r; -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) unsigned char r, g, b, m; #elif TNZ_MACHINE_CHANNEL_ORDER_MRGB Channel m, r, g, b; @@ -164,9 +164,9 @@ public: #ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM Channel b, g, r, m; -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) Channel m, r, g, b; -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) Channel r, g, b, m; #else undefined machine order !!!! diff --git a/toonz/sources/stdfx/pins.cpp b/toonz/sources/stdfx/pins.cpp index b72016e..aba1565 100644 --- a/toonz/sources/stdfx/pins.cpp +++ b/toonz/sources/stdfx/pins.cpp @@ -138,7 +138,7 @@ void subCompute(TRasterFxPort &m_input, TTile &tile, double frame, TRectD clippingRect = TRectD(tile.m_pos, TDimensionD(tile.getRaster()->getLx(), tile.getRaster()->getLy())); -#if CREATE_GL_CONTEXT_ONE_TIME +#ifdef CREATE_GL_CONTEXT_ONE_TIME int ret = wglMakeCurrent(m_offScreenGL.m_offDC, m_offScreenGL.m_hglRC); assert(ret == TRUE); #else @@ -168,7 +168,7 @@ void subCompute(TRasterFxPort &m_input, TTile &tile, double frame, glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); checkErrorsByGL -#if !CREATE_GL_CONTEXT_ONE_TIME +#ifndef CREATE_GL_CONTEXT_ONE_TIME TRaster32P rasaux; if (!wireframe) { TRaster32P texture(texWidth, texHeight); diff --git a/toonz/sources/t32bitsrv/t323gpmsg.cpp b/toonz/sources/t32bitsrv/t323gpmsg.cpp index aac1646..5892ab1 100644 --- a/toonz/sources/t32bitsrv/t323gpmsg.cpp +++ b/toonz/sources/t32bitsrv/t323gpmsg.cpp @@ -13,9 +13,9 @@ #include "tproperty.h" #include "tsound.h" -#ifdef WIN32 +#if defined(_WIN32) #include "../image/3gp/tiio_3gp.h" -#elif MACOSX +#elif defined(MACOSX) #include "../image/3gp/tiio_3gpM.h" #endif diff --git a/toonz/sources/t32bitsrv/t32movmsg.cpp b/toonz/sources/t32bitsrv/t32movmsg.cpp index fcc2581..6372526 100644 --- a/toonz/sources/t32bitsrv/t32movmsg.cpp +++ b/toonz/sources/t32bitsrv/t32movmsg.cpp @@ -13,9 +13,9 @@ #include "tproperty.h" #include "tsound.h" -#ifdef WIN32 +#if defined(_WIN32) #include "../image/mov/tiio_mov.h" -#elif MACOSX +#elif defined(MACOSX) #include "../image/mov/tiio_movM.h" #include #endif diff --git a/toonz/sources/tnztools/stylepicker.cpp b/toonz/sources/tnztools/stylepicker.cpp index ccf8c65..a236390 100644 --- a/toonz/sources/tnztools/stylepicker.cpp +++ b/toonz/sources/tnztools/stylepicker.cpp @@ -151,13 +151,13 @@ namespace { TPixel32 getAverageColor(const TRect &rect) { GLenum fmt = -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) GL_RGBA; -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) GL_ABGR_EXT; -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) GL_RGBA; -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) GL_BGRA; #else // Error PLATFORM NOT SUPPORTED @@ -181,13 +181,13 @@ TPixel32 getAverageColor(const TRect &rect) { TPixel32 getAverageColor(TStroke *stroke) { GLenum fmt = -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) GL_RGBA; -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) GL_ABGR_EXT; -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) GL_RGBA; -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) GL_BGRA; #else // Error PLATFORM NOT SUPPORTED diff --git a/toonz/sources/toonzfarm/tnzcore_stuff/tthread.cpp b/toonz/sources/toonzfarm/tnzcore_stuff/tthread.cpp index f5d15b9..6211827 100644 --- a/toonz/sources/toonzfarm/tnzcore_stuff/tthread.cpp +++ b/toonz/sources/toonzfarm/tnzcore_stuff/tthread.cpp @@ -40,13 +40,13 @@ public: void join(); void cancel(); -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(disable : 4290) #endif static void milestone() throw(TThread::Interrupt); -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(default : 4290) #endif @@ -240,7 +240,7 @@ void Thread::cancel() { //------------------------------------------------------------------------------ // static member function -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(disable : 4290) #endif @@ -252,7 +252,7 @@ void Thread::milestone() throw(TThread::Interrupt) { if (Thread::Imp::m_state[key.m_id]) throw TThread::Interrupt(); } -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(default : 4290) #endif @@ -278,13 +278,13 @@ void ThreadGroup::joinAll() { m_imp->m_boostThreadGroup.join_all(); } //============================================================================== -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(disable : 4290) #endif void TThread::milestone() throw(TThread::Interrupt) { Thread::milestone(); } -#if defined(WIN32) && (_MSC_VER == 1200) +#if defined(_WIN32) && (_MSC_VER == 1200) #pragma warning(default : 4290) #endif diff --git a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h index 7c19959..45dfb74 100644 --- a/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h +++ b/toonz/sources/toonzlib/sandor_fxs/STColSelPic.h @@ -1,6 +1,6 @@ #pragma once -#if _MSC_VER >= 1400 +#if defined(_MSC_VER) && (_MSC_VER >= 1400) #define _CRT_SECURE_NO_DEPRECATE 1 #endif diff --git a/toonz/sources/toonzlib/texturemanager.cpp b/toonz/sources/toonzlib/texturemanager.cpp index 6e48057..ae29a52 100644 --- a/toonz/sources/toonzlib/texturemanager.cpp +++ b/toonz/sources/toonzlib/texturemanager.cpp @@ -92,13 +92,13 @@ TDimension TextureManager::getMaxSize(bool isRGBM) { void TextureManager::getFmtAndType(bool isRGBM, GLenum &fmt, GLenum &type) { if (isRGBM) { fmt = -#ifdef TNZ_MACHINE_CHANNEL_ORDER_BGRM +#if defined(TNZ_MACHINE_CHANNEL_ORDER_BGRM) GL_BGRA_EXT -#elif TNZ_MACHINE_CHANNEL_ORDER_MBGR +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MBGR) GL_ABGR_EXT -#elif TNZ_MACHINE_CHANNEL_ORDER_RGBM +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_RGBM) GL_RGBA -#elif TNZ_MACHINE_CHANNEL_ORDER_MRGB +#elif defined(TNZ_MACHINE_CHANNEL_ORDER_MRGB) GL_BGRA #else @undefined chan order