Merge pull request #1380 from ElectricSolstice/wparentheses_removal
Changed code to remove gcc -Wparentheses warnings.
This commit is contained in:
commit
f706e3e5d1
@ -519,9 +519,9 @@ public:
|
|||||||
|
|
||||||
bool s_ab = (b.x-a.x)*as_y-(b.y-a.y)*as_x > 0;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -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 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 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;
|
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)
|
if (best_use_color4)
|
||||||
{
|
{
|
||||||
|
@ -489,7 +489,7 @@ static const TRexChar *trex_matchnode(TRex* exp,TRexNode *node,const TRexChar *s
|
|||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
case OP_WB:
|
case OP_WB:
|
||||||
if(str == exp->_bol && !isspace(*str)
|
if((str == exp->_bol && !isspace(*str))
|
||||||
|| (str == exp->_eol && !isspace(*(str-1)))
|
|| (str == exp->_eol && !isspace(*(str-1)))
|
||||||
|| (!isspace(*str) && isspace(*(str+1)))
|
|| (!isspace(*str) && isspace(*(str+1)))
|
||||||
|| (isspace(*str) && !isspace(*(str+1))) ) {
|
|| (isspace(*str) && !isspace(*(str+1))) ) {
|
||||||
|
@ -248,7 +248,7 @@ static_codebook *vorbis_staticbook_unpack(oggpack_buffer *opb){
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* quantized values */
|
/* 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;
|
goto _eofout;
|
||||||
s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
|
s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals);
|
||||||
for(i=0;i<quantvals;i++)
|
for(i=0;i<quantvals;i++)
|
||||||
|
@ -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->loneighbor[i-2]]&=0x7fff;
|
||||||
fit_value[look->hineighbor[i-2]]&=0x7fff;
|
fit_value[look->hineighbor[i-2]]&=0x7fff;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) {
|
|||||||
scode+="uniform float fmp_normal;\n";
|
scode+="uniform float fmp_normal;\n";
|
||||||
scode+="uniform texture fmp_normal_tex;\n";
|
scode+="uniform texture fmp_normal_tex;\n";
|
||||||
String uv_str;
|
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
|
uv_str="uv"; //sorry not supported
|
||||||
} else {
|
} else {
|
||||||
uv_str=_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_NORMAL);
|
uv_str=_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_NORMAL);
|
||||||
|
@ -630,11 +630,13 @@ bool ScriptEditor::_test_script_times_on_disk() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!all_ok)
|
if (!all_ok) {
|
||||||
if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false)))
|
if (bool(EDITOR_DEF("text_editor/auto_reload_changed_scripts",false))) {
|
||||||
script_editor->_reload_scripts();
|
script_editor->_reload_scripts();
|
||||||
else
|
} else {
|
||||||
disk_changed->call_deferred("popup_centered_ratio",0.5);
|
disk_changed->call_deferred("popup_centered_ratio",0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return all_ok;
|
return all_ok;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user