Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-21 16:33:19 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-06-21 16:33:19 +0400
commit2df82a2a2be909e0a1208ed2fe41637f24436414 (patch)
treea89c92df23c951a8dc31cffd58b999545e058ac9 /source/blender/imbuf
parentd6f38e4e018a75458290e3ed26dd80c2cf0af882 (diff)
Code cleanup: fix some vs2012 compiler warnings
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h18
-rw-r--r--source/blender/imbuf/intern/dds/DirectDrawSurface.cpp36
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp4
3 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index dde8d4d4ab7..1734073dd6c 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -248,24 +248,24 @@ typedef struct ImBuf {
/* dds */
#ifdef WITH_DDS
-#ifndef MAKEFOURCC
-#define MAKEFOURCC(ch0, ch1, ch2, ch3)\
+#ifndef DDS_MAKEFOURCC
+#define DDS_MAKEFOURCC(ch0, ch1, ch2, ch3)\
((unsigned long)(unsigned char)(ch0) | \
((unsigned long)(unsigned char)(ch1) << 8) | \
((unsigned long)(unsigned char)(ch2) << 16) | \
((unsigned long)(unsigned char)(ch3) << 24))
-#endif /* MAKEFOURCC */
+#endif /* DDS_MAKEFOURCC */
/*
* FOURCC codes for DX compressed-texture pixel formats
*/
-#define FOURCC_DDS (MAKEFOURCC('D','D','S',' '))
-#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1'))
-#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2'))
-#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3'))
-#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4'))
-#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5'))
+#define FOURCC_DDS (DDS_MAKEFOURCC('D','D','S',' '))
+#define FOURCC_DXT1 (DDS_MAKEFOURCC('D','X','T','1'))
+#define FOURCC_DXT2 (DDS_MAKEFOURCC('D','X','T','2'))
+#define FOURCC_DXT3 (DDS_MAKEFOURCC('D','X','T','3'))
+#define FOURCC_DXT4 (DDS_MAKEFOURCC('D','X','T','4'))
+#define FOURCC_DXT5 (DDS_MAKEFOURCC('D','X','T','5'))
#endif /* DDS */
extern const char *imb_ext_image[];
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;