Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit e7178dc

Browse files
committed
[[ Cleanup ]] Correct use of MCArray ops in bitmap effects and gradients
This patch corrects the use of MCArrayFetch/Store value in the bitmap effect and gradient set/get property functions. Previously they were using kMCCompareExact as the argument to 'case_sensitive'. This has been replaced with ctxt.GetCaseSensitive().
1 parent a5bf0dd commit e7178dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

engine/src/bitmapeffect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ bool MCBitmapEffectsGetProperty(MCExecContext& ctxt, MCBitmapEffectsRef& self, M
706706
// Fetch the property, then store it into the array.
707707
MCBitmapEffectFetchProperty(ctxt, t_effect, s_bitmap_effect_properties[i] . value, t_value);
708708
MCExecTypeConvertAndReleaseAlways(ctxt, t_value . type, &t_value , kMCExecValueTypeValueRef, &(&t_valueref));
709-
MCArrayStoreValue(*v, ctxt . GetCaseSensitive(), MCNAME(s_bitmap_effect_properties[i] . token), *t_valueref);
709+
MCArrayStoreValue(*v, false, MCNAME(s_bitmap_effect_properties[i] . token), *t_valueref);
710710
}
711711
}
712712
r_value . arrayref_value = MCValueRetain(*v);
@@ -1021,7 +1021,7 @@ bool MCBitmapEffectsSetProperty(MCExecContext& ctxt, MCBitmapEffectsRef& self, M
10211021
MCValueRef t_prop_value;
10221022

10231023
// If we don't have the given element, then move to the next one
1024-
if (!MCArrayFetchValue(*t_array, kMCCompareExact, MCNAME(s_bitmap_effect_properties[i] . token), t_prop_value))
1024+
if (!MCArrayFetchValue(*t_array, false, MCNAME(s_bitmap_effect_properties[i] . token), t_prop_value))
10251025
continue;
10261026

10271027
// Otherwise, fetch the keys value and attempt to set the property

engine/src/gradient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ bool MCGradientFillGetProperties(MCExecContext& ctxt, MCGradientFill* p_gradient
253253
t_success = !ctxt . HasError();
254254
}
255255
if (t_success)
256-
t_success = MCArrayStoreValue(*v, kMCCompareExact, MCNAME(gradientprops[tablesize].token), t_prop_value);
256+
t_success = MCArrayStoreValue(*v, false, MCNAME(gradientprops[tablesize].token), t_prop_value);
257257
}
258258

259259
MCerrorlock--;
@@ -523,7 +523,7 @@ bool MCGradientFillSetProperties(MCExecContext& ctxt, MCGradientFill*& x_gradien
523523
{
524524
MCValueRef t_prop_value;
525525

526-
if (MCArrayFetchValue(*t_array, kMCCompareExact, MCNAME(gradientprops[tablesize].token), t_prop_value))
526+
if (MCArrayFetchValue(*t_array, false, MCNAME(gradientprops[tablesize].token), t_prop_value))
527527
{
528528
MCExecValue t_value;
529529
t_value . valueref_value = MCValueRetain(t_prop_value);

0 commit comments

Comments
 (0)