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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-05-29 15:49:39 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-05-29 15:49:39 +0400
commit9e05f6571f824bd4a99bb4fe5af5ec15688a9649 (patch)
tree258cb4a162bdcad89b4cdbf5d5f86ad352ebd999 /source/blender/render/intern/source/pipeline.c
parente99801dc706b7ff4cea0656e408c20835638dd6b (diff)
Make sure bool will always have the same size in C and C++
There were an issues with data structures defined in headers and being used by both C and C++ on systems with stdbool unavailable. This happened because bool in this case will be defined as unsigned int, which is 4 bytes. But C++'s bool is only 1 byte and this lead to alignment issues. Now bool is always 1 byte, also made sure there's no situation like bool foo = BitField & BitFlag, which could give overflow issues. Use (BitField & BitFlag) != 0 instead. Fixes #35553: Compositor broken (Backdrop & Preview)
Diffstat (limited to 'source/blender/render/intern/source/pipeline.c')
-rw-r--r--source/blender/render/intern/source/pipeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 517b30467ce..d35121e8ae5 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -472,7 +472,7 @@ void RE_FreePersistentData(void)
/* disprect is optional, if NULL it assumes full window render */
void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *srl, int winx, int winy, rcti *disprect)
{
- bool had_freestyle = (re->r.mode & R_EDGE_FRS);
+ bool had_freestyle = (re->r.mode & R_EDGE_FRS) != 0;
re->ok = TRUE; /* maybe flag */