Merge pull request #1380 from ElectricSolstice/wparentheses_removal

Changed code to remove gcc -Wparentheses warnings.
This commit is contained in:
Juan Linietsky 2015-03-22 15:05:47 -03:00
commit f706e3e5d1
7 changed files with 12 additions and 10 deletions

View File

@ -519,9 +519,9 @@ public:
bool s_ab = (b.x-a.x)*as_y-(b.y-a.y)*as_x > 0;
if((c.x-a.x)*as_y-(c.y-a.y)*as_x > 0 == s_ab) return false;
if(((c.x-a.x)*as_y-(c.y-a.y)*as_x > 0) == s_ab) return false;
if((c.x-b.x)*(s.y-b.y)-(c.y-b.y)*(s.x-b.x) > 0 != s_ab) return false;
if(((c.x-b.x)*(s.y-b.y)-(c.y-b.y)*(s.x-b.x) > 0) != s_ab) return false;
return true;
}

View File

@ -2367,7 +2367,7 @@ found_perfect_match:
int dr = best_results[1].m_block_color_unscaled.r - best_results[0].m_block_color_unscaled.r;
int dg = best_results[1].m_block_color_unscaled.g - best_results[0].m_block_color_unscaled.g;
int db = best_results[1].m_block_color_unscaled.b - best_results[0].m_block_color_unscaled.b;
RG_ETC1_ASSERT(best_use_color4 || (rg_etc1::minimum(dr, dg, db) >= cETC1ColorDeltaMin) && (rg_etc1::maximum(dr, dg, db) <= cETC1ColorDeltaMax));
RG_ETC1_ASSERT(best_use_color4 || ((rg_etc1::minimum(dr, dg, db) >= cETC1ColorDeltaMin) && (rg_etc1::maximum(dr, dg, db) <= cETC1ColorDeltaMax)));
if (best_use_color4)
{

View File

@ -489,7 +489,7 @@ static const TRexChar *trex_matchnode(TRex* exp,TRexNode *node,const TRexChar *s
return cur;
}
case OP_WB:
if(str == exp->_bol && !isspace(*str)
if((str == exp->_bol && !isspace(*str))
|| (str == exp->_eol && !isspace(*(str-1)))
|| (!isspace(*str) && isspace(*(str+1)))
|| (isspace(*str) && !isspace(*(str+1))) ) {

View File

@ -248,7 +248,7 @@ static_codebook *vorbis_staticbook_unpack(oggpack_buffer *opb){
}
/* quantized values */
if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb))
if(((quantvals*s->q_quant+7)>>3)>opb->storage-oggpack_bytes(opb))
goto _eofout;
s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
for(i=0;i<quantvals;i++)

View File

@ -1035,7 +1035,7 @@ static void *floor1_inverse1(vorbis_block *vb,vorbis_look_floor *in){
}
}
fit_value[i]=val+predicted&0x7fff;
fit_value[i]=(val+predicted)&0x7fff;
fit_value[look->loneighbor[i-2]]&=0x7fff;
fit_value[look->hineighbor[i-2]]&=0x7fff;

View File

@ -91,7 +91,7 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) {
scode+="uniform float fmp_normal;\n";
scode+="uniform texture fmp_normal_tex;\n";
String uv_str;
if ((p_key.texcoord_mask>>(VS::FIXED_MATERIAL_PARAM_NORMAL*2))&0x3==VS::FIXED_MATERIAL_TEXCOORD_SPHERE) {
if (((p_key.texcoord_mask>>(VS::FIXED_MATERIAL_PARAM_NORMAL*2))&0x3)==VS::FIXED_MATERIAL_TEXCOORD_SPHERE) {
uv_str="uv"; //sorry not supported
} else {
uv_str=_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_NORMAL);

View File

@ -630,11 +630,13 @@ bool ScriptEditor::_test_script_times_on_disk() {
if (!all_ok)
if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false)))
if (!all_ok) {
if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) {
script_editor->_reload_scripts();
else
} else {
disk_changed->call_deferred("popup_centered_ratio",0.5);
}
}
return all_ok;
}