Fix for bool flag use

This commit is contained in:
2015-01-07 11:41:45 +11:00
parent 848c00f7e7
commit 29d2c71117
12 changed files with 19 additions and 19 deletions

View File

@@ -67,7 +67,7 @@ void ImagesExporter::export_UV_Image(Image *image, bool use_copies)
return;
}
bool is_dirty = imbuf->userflags & IB_BITMAPDIRTY;
bool is_dirty = (imbuf->userflags & IB_BITMAPDIRTY) != 0;
ImageFormatData imageFormat;
BKE_imbuf_to_image_format(&imageFormat, imbuf);

View File

@@ -185,7 +185,7 @@ public:
void setFastCalculation(bool fastCalculation) {this->m_fastCalculation = fastCalculation;}
bool isFastCalculation() const { return this->m_fastCalculation; }
bool isGroupnodeBufferEnabled() const { return this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER; }
bool isGroupnodeBufferEnabled() const { return (this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER) != 0; }
};

View File

@@ -34,7 +34,7 @@ void CompositorNode::convertToOperations(NodeConverter &converter, const Composi
bNode *editorNode = this->getbNode();
bool is_active = (editorNode->flag & NODE_DO_OUTPUT_RECALC) ||
context.isRendering();
bool ignore_alpha = editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA;
bool ignore_alpha = (editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0;
NodeInput *imageSocket = this->getInputSocket(0);
NodeInput *alphaSocket = this->getInputSocket(1);

View File

@@ -41,8 +41,8 @@ void MixNode::convertToOperations(NodeConverter &converter, const CompositorCont
NodeInput *color2Socket = this->getInputSocket(2);
NodeOutput *outputSocket = this->getOutputSocket(0);
bNode *editorNode = this->getbNode();
bool useAlphaPremultiply = this->getbNode()->custom2 & 1;
bool useClamp = this->getbNode()->custom2 & 2;
bool useAlphaPremultiply = (this->getbNode()->custom2 & 1) != 0;
bool useClamp = (this->getbNode()->custom2 & 2) != 0;
MixBaseOperation *convertProg;
switch (editorNode->custom1) {

View File

@@ -35,7 +35,7 @@ void ViewerNode::convertToOperations(NodeConverter &converter, const CompositorC
{
bNode *editorNode = this->getbNode();
bool do_output = (editorNode->flag & NODE_DO_OUTPUT_RECALC || context.isRendering()) && (editorNode->flag & NODE_DO_OUTPUT);
bool ignore_alpha = editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA;
bool ignore_alpha = (editorNode->custom2 & CMP_NODE_OUTPUT_IGNORE_ALPHA) != 0;
NodeInput *imageSocket = this->getInputSocket(0);
NodeInput *alphaSocket = this->getInputSocket(1);

View File

@@ -1122,7 +1122,7 @@ static void draw_plane_marker_ex(SpaceClip *sc, Scene *scene, MovieTrackingPlane
bool draw_outline, int width, int height)
{
bool tiny = (sc->flag & SC_SHOW_TINY_MARKER) != 0;
bool is_selected_track = plane_track->flag & SELECT;
bool is_selected_track = (plane_track->flag & SELECT) != 0;
bool draw_plane_quad = plane_track->image == NULL || plane_track->image_opacity == 0.0f;
float px[2];

View File

@@ -846,7 +846,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
vgroup_validmap = BKE_object_defgroup_subset_from_select_type(ob, subset_type, &vgroup_tot, &subset_count);
for (i = 0, dg = ob->defbase.first; dg; i++, dg = dg->next) {
bool locked = dg->flag & DG_LOCK_WEIGHT;
bool locked = (dg->flag & DG_LOCK_WEIGHT) != 0;
if (vgroup_validmap[i]) {
MDeformWeight *dw = defvert_find_index(dv, i);
if (dw) {

View File

@@ -3831,9 +3831,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
/* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse */
for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
if (FrameOnMouseSide(t->frame_side, bezt->vec[1][0], cfra)) {
const bool sel2 = bezt->f2 & SELECT;
const bool sel1 = use_handle ? bezt->f1 & SELECT : sel2;
const bool sel3 = use_handle ? bezt->f3 & SELECT : sel2;
const bool sel2 = (bezt->f2 & SELECT) != 0;
const bool sel1 = use_handle ? (bezt->f1 & SELECT) != 0 : sel2;
const bool sel3 = use_handle ? (bezt->f3 & SELECT) != 0 : sel2;
if (!is_translation_mode || !(sel2)) {
if (sel1) {
@@ -3917,9 +3917,9 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
/* only include BezTriples whose 'keyframe' occurs on the same side of the current frame as mouse (if applicable) */
for (i = 0, bezt = fcu->bezt; i < fcu->totvert; i++, bezt++) {
if (FrameOnMouseSide(t->frame_side, bezt->vec[1][0], cfra)) {
const bool sel2 = bezt->f2 & SELECT;
const bool sel1 = use_handle ? bezt->f1 & SELECT : sel2;
const bool sel3 = use_handle ? bezt->f3 & SELECT : sel2;
const bool sel2 = (bezt->f2 & SELECT) != 0;
const bool sel1 = use_handle ? (bezt->f1 & SELECT) != 0 : sel2;
const bool sel3 = use_handle ? (bezt->f3 & SELECT) != 0 : sel2;
TransDataCurveHandleFlags *hdata = NULL;
/* short h1=1, h2=1; */ /* UNUSED */

View File

@@ -404,7 +404,7 @@ static DerivedMesh *arrayModifier_doArray(
int *full_doubles_map = NULL;
int tot_doubles;
const bool use_merge = amd->flags & MOD_ARR_MERGE;
const bool use_merge = (amd->flags & MOD_ARR_MERGE) != 0;
const bool use_recalc_normals = (dm->dirty & DM_DIRTY_NORMALS) || use_merge;
const bool use_offset_ob = ((amd->offset_type & MOD_ARR_OFF_OBJ) && amd->offset_ob);
/* allow pole vertices to be used by many faces */

View File

@@ -280,8 +280,8 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 0) != 0);
#endif
// bool novertexarrays = (SYS_GetCommandLineInt(syshandle, "novertexarrays", 0) != 0);
bool mouse_state = startscene->gm.flag & GAME_SHOW_MOUSE;
bool restrictAnimFPS = startscene->gm.flag & GAME_RESTRICT_ANIM_UPDATES;
bool mouse_state = (startscene->gm.flag & GAME_SHOW_MOUSE) != 0;
bool restrictAnimFPS = (startscene->gm.flag & GAME_RESTRICT_ANIM_UPDATES) != 0;
short drawtype = v3d->drawtype;

View File

@@ -567,7 +567,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0);
bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0) && GPU_display_list_support();
bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0);
bool restrictAnimFPS = gm->flag & GAME_RESTRICT_ANIM_UPDATES;
bool restrictAnimFPS = (gm->flag & GAME_RESTRICT_ANIM_UPDATES) != 0;
if (GLEW_ARB_multitexture && GLEW_VERSION_1_1)
m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", 1) != 0);

View File

@@ -218,7 +218,7 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice,
m_bucketmanager=new RAS_BucketManager();
bool showObstacleSimulation = scene->gm.flag & GAME_SHOW_OBSTACLE_SIMULATION;
bool showObstacleSimulation = (scene->gm.flag & GAME_SHOW_OBSTACLE_SIMULATION) != 0;
switch (scene->gm.obstacleSimulation)
{
case OBSTSIMULATION_TOI_rays: