Skip to content

Commit 12f438d

Browse files
committed
Removals of GetEP() calls where possible
1 parent 31b7540 commit 12f438d

File tree

10 files changed

+18
-18
lines changed

10 files changed

+18
-18
lines changed

engine/src/debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void MCB_prepmessage(MCExecContext &ctxt, MCNameRef mess, uint2 line, uint2 pos,
211211
Boolean added = False;
212212
if (MCnexecutioncontexts < MAX_CONTEXTS)
213213
{
214-
ctxt.GetEP().setline(line);
214+
ctxt.SetLine(line);
215215
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
216216
added = True;
217217
}

engine/src/exec-debugging.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void MCDebuggingExecDebugDo(MCExecContext& ctxt, MCStringRef p_script, uinteger_
6363
Boolean added = False;
6464
if (MCnexecutioncontexts < MAX_CONTEXTS)
6565
{
66-
ctxt.GetEP().setline(p_line);
66+
ctxt.SetLine(p_line);
6767
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
6868
added = True;
6969
}

engine/src/exec-engine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ void MCEngineExecDo(MCExecContext& ctxt, MCStringRef p_script, int p_line, int p
780780
Boolean added = False;
781781
if (MCnexecutioncontexts < MAX_CONTEXTS)
782782
{
783-
ctxt.GetEP().setline(p_line);
783+
ctxt.SetLine(p_line);
784784
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
785785
added = True;
786786
}

engine/src/exec-interface.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,12 @@ MCExecEnumTypeInfo *kMCInterfaceWindowAlignmentTypeInfo = &_kMCInterfaceWindowAl
365365

366366
bool MCInterfaceTryToResolveObject(MCExecContext& ctxt, MCStringRef long_id, MCObjectPtr& r_object)
367367
{
368-
ctxt.GetEP().setvalueref(long_id);
369-
370368
bool t_found;
371369
t_found = false;
372370

373371
MCChunk *tchunk = new MCChunk(False);
374372
MCerrorlock++;
375-
MCScriptPoint sp(ctxt);
373+
MCScriptPoint sp(long_id);
376374
if (tchunk->parse(sp, False) == PS_NORMAL)
377375
{
378376
if (tchunk->getobj(ctxt, r_object, True))

engine/src/exec-keywords.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ void MCKeywordsExecCommandOrFunction(MCExecContext& ctxt, bool resolved, MCHandl
171171
Boolean added = False;
172172
if (MCnexecutioncontexts < MAX_CONTEXTS)
173173
{
174-
ctxt . GetEP() . setline(line);
174+
ctxt . SetLine(line);
175175
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
176176
added = True;
177177
}
@@ -610,7 +610,7 @@ void MCKeywordsExecTry(MCExecContext& ctxt, MCStatement *trystatements, MCStatem
610610
if (MCexitall)
611611
break;
612612
}
613-
ctxt . GetEP() . setline(tspr->getline());
613+
ctxt . SetLine(tspr->getline());
614614

615615
stat = tspr->exec(ctxt . GetEP());
616616

engine/src/externalv0.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ static Exec_stat getvarptr(MCExecContext& ctxt, const MCString &vname,MCVariable
286286
/* UNCHECKED */ t_name . CreateWithOldString(vname);
287287

288288
MCVarref *newvar;
289+
289290
if (MCECptr->GetEP().findvar(t_name, &newvar) != PS_NORMAL)
290291
return ES_ERROR;
291292

engine/src/handler.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,8 +943,7 @@ Exec_stat MCHandler::getvarnames(MCExecPoint& ep, Boolean all)
943943

944944
void MCHandler::eval(MCExecContext &ctxt, MCStringRef p_expression, MCValueRef &r_value)
945945
{
946-
ctxt.GetEP().setvalueref(p_expression);
947-
MCScriptPoint sp(ctxt);
946+
MCScriptPoint sp(p_expression);
948947
sp.sethandler(this);
949948
MCExpression *exp = NULL;
950949
Symbol_type type;

engine/src/hndlrlst.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ Parse_stat MCHandlerlist::findvar(MCNameRef p_name, bool p_ignore_uql, MCVarref
242242
if (MCdebugcontext != MAXUINT2)
243243
{
244244
MCExecContext *ctxtptr = MCexecutioncontexts[MCdebugcontext];
245-
if (ctxtptr->GetEP().gethlist() != this)
245+
if (ctxtptr->GetHandlerList() != this)
246246
if (ctxtptr->GetHandler()->findvar(p_name, dptr) != PS_NORMAL)
247-
return ctxtptr->GetEP().gethlist()->findvar(p_name, false, dptr);
247+
return ctxtptr->GetHandlerList()->findvar(p_name, false, dptr);
248248
else
249249
return PS_NORMAL;
250250
}

engine/src/mblhandlers.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6069,17 +6069,19 @@ Exec_stat MCHandleSpecificCameraFeatures(void *p_context, MCParameter *p_paramet
60696069

60706070
MCCameraFeaturesType t_features_set;
60716071
t_features_set = (MCCameraFeaturesType)t_result;
6072+
MCAutoListRef t_list;
6073+
/* UNCHECKED */ MCListCreateMutable(EC_COMMA, &t_list);
60726074

60736075
if ((t_features_set & kMCCameraFeaturePhoto) != 0)
6074-
ctxt . GetEP() . concatcstring("photo", EC_COMMA, ctxt . GetEP() . isempty());
6076+
/* UNCHECKED */ MCListAppendCString(*t_list, "photo");
60756077
if ((t_features_set & kMCCameraFeatureVideo) != 0)
6076-
ctxt . GetEP() . concatcstring("video", EC_COMMA, ctxt . GetEP() . isempty());
6078+
/* UNCHECKED */ MCListAppendCString(*t_list, "video");
60776079
if ((t_features_set & kMCCameraFeatureFlash) != 0)
6078-
ctxt . GetEP() . concatcstring("flash", EC_COMMA, ctxt . GetEP() . isempty());
6080+
/* UNCHECKED */ MCListAppendCString(*t_list, "flash");
60796081

60806082
MCAutoStringRef t_features;
6081-
/* UNCHECKED */ ep . copyasstringref(&t_features);
6082-
ctxt . SetTheResultToValue(&t_result);
6083+
/* UNCHECKED */ MCListCopyAsString(*t_list, &t_features);
6084+
ctxt . SetTheResultToValue(*t_features);
60836085

60846086
return ES_NORMAL;
60856087
}

engine/src/property.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5190,7 +5190,7 @@ void MCProperty::eval_count_ctxt(MCExecContext& ctxt, MCExecValue& r_value)
51905190

51915191
void MCProperty::eval_ctxt(MCExecContext& ctxt, MCExecValue& r_value)
51925192
{
5193-
ctxt . GetEP() . setline(line);
5193+
ctxt . SetLine(line);
51945194

51955195
if (destvar != nil && which != P_CUSTOM_VAR)
51965196
return eval_variable_ctxt(ctxt, r_value);

0 commit comments

Comments
 (0)