diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-21 16:33:19 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-06-21 16:33:19 +0400 |
commit | 2df82a2a2be909e0a1208ed2fe41637f24436414 (patch) | |
tree | a89c92df23c951a8dc31cffd58b999545e058ac9 /source/blender/imbuf/intern | |
parent | d6f38e4e018a75458290e3ed26dd80c2cf0af882 (diff) |
Code cleanup: fix some vs2012 compiler warnings
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/dds/DirectDrawSurface.cpp | 36 | ||||
-rw-r--r-- | source/blender/imbuf/intern/openexr/openexr_api.cpp | 4 |
2 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp index df15cb3e357..f6606711cc3 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.cpp @@ -65,28 +65,28 @@ /*** declarations ***/ -#if !defined(MAKEFOURCC) -# define MAKEFOURCC(ch0, ch1, ch2, ch3) \ +#if !defined(DDS_MAKEFOURCC) +# define DDS_MAKEFOURCC(ch0, ch1, ch2, ch3) \ (uint(uint8(ch0)) | (uint(uint8(ch1)) << 8) | \ (uint(uint8(ch2)) << 16) | (uint(uint8(ch3)) << 24 )) #endif -static const uint FOURCC_NVTT = MAKEFOURCC('N', 'V', 'T', 'T'); -static const uint FOURCC_DDS = MAKEFOURCC('D', 'D', 'S', ' '); -static const uint FOURCC_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'); -static const uint FOURCC_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'); -static const uint FOURCC_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'); -static const uint FOURCC_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'); -static const uint FOURCC_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'); -static const uint FOURCC_RXGB = MAKEFOURCC('R', 'X', 'G', 'B'); -static const uint FOURCC_ATI1 = MAKEFOURCC('A', 'T', 'I', '1'); -static const uint FOURCC_ATI2 = MAKEFOURCC('A', 'T', 'I', '2'); - -static const uint FOURCC_A2XY = MAKEFOURCC('A', '2', 'X', 'Y'); +static const uint FOURCC_NVTT = DDS_MAKEFOURCC('N', 'V', 'T', 'T'); +static const uint FOURCC_DDS = DDS_MAKEFOURCC('D', 'D', 'S', ' '); +static const uint FOURCC_DXT1 = DDS_MAKEFOURCC('D', 'X', 'T', '1'); +static const uint FOURCC_DXT2 = DDS_MAKEFOURCC('D', 'X', 'T', '2'); +static const uint FOURCC_DXT3 = DDS_MAKEFOURCC('D', 'X', 'T', '3'); +static const uint FOURCC_DXT4 = DDS_MAKEFOURCC('D', 'X', 'T', '4'); +static const uint FOURCC_DXT5 = DDS_MAKEFOURCC('D', 'X', 'T', '5'); +static const uint FOURCC_RXGB = DDS_MAKEFOURCC('R', 'X', 'G', 'B'); +static const uint FOURCC_ATI1 = DDS_MAKEFOURCC('A', 'T', 'I', '1'); +static const uint FOURCC_ATI2 = DDS_MAKEFOURCC('A', 'T', 'I', '2'); + +static const uint FOURCC_A2XY = DDS_MAKEFOURCC('A', '2', 'X', 'Y'); -static const uint FOURCC_DX10 = MAKEFOURCC('D', 'X', '1', '0'); +static const uint FOURCC_DX10 = DDS_MAKEFOURCC('D', 'X', '1', '0'); -static const uint FOURCC_UVER = MAKEFOURCC('U', 'V', 'E', 'R'); +static const uint FOURCC_UVER = DDS_MAKEFOURCC('U', 'V', 'E', 'R'); // 32 bit RGB formats. static const uint D3DFMT_R8G8B8 = 20; @@ -672,7 +672,7 @@ void DDSHeader::setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3) { // set fourcc pixel format. this->pf.flags = DDPF_FOURCC; - this->pf.fourcc = MAKEFOURCC(c0, c1, c2, c3); + this->pf.fourcc = DDS_MAKEFOURCC(c0, c1, c2, c3); this->pf.bitcount = 0; this->pf.rmask = 0; @@ -696,7 +696,7 @@ void DDSHeader::setFormatCode(uint32 code) void DDSHeader::setSwizzleCode(uint8 c0, uint8 c1, uint8 c2, uint8 c3) { - this->pf.bitcount = MAKEFOURCC(c0, c1, c2, c3); + this->pf.bitcount = DDS_MAKEFOURCC(c0, c1, c2, c3); } diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp index 8159520f693..6db7cfc8efd 100644 --- a/source/blender/imbuf/intern/openexr/openexr_api.cpp +++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp @@ -640,7 +640,7 @@ void IMB_exrtile_begin_write(void *handle, const char *filename, int mipmap, int data->ofile_stream = new OFileStream(filename); data->tofile = new TiledOutputFile(*(data->ofile_stream), header); } - catch (const std::exception &exc) { + catch (const std::exception &) { delete data->tofile; delete data->ofile_stream; @@ -660,7 +660,7 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig data->ifile_stream = new IFileStream(filename); data->ifile = new InputFile(*(data->ifile_stream)); } - catch (const std::exception &exc) { + catch (const std::exception &) { delete data->ifile; delete data->ifile_stream; |