Skip to content

Commit baa8fdc

Browse files
committed
[[ Cleanup ]] Remove instances of MCLog nil, NULL or 0 second param
1 parent d0e4783 commit baa8fdc

13 files changed

Lines changed: 56 additions & 56 deletions

engine/src/dsklnx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static void configureSerialPort(int sRefNum)
184184
struct termios theTermios;
185185
if (tcgetattr(sRefNum, &theTermios) < 0)
186186
{
187-
MCLog("Error getting terminous attributes", nil);
187+
MCLog("Error getting terminous attributes");
188188
}
189189
cfsetispeed(&theTermios, B9600);
190190
theTermios.c_cflag = CS8;
@@ -206,7 +206,7 @@ static void configureSerialPort(int sRefNum)
206206
parseSerialControlStr(str,&theTermios);
207207
if (tcsetattr(sRefNum, TCSANOW, &theTermios) < 0)
208208
{
209-
MCLog("Error setting terminous attributes", nil);
209+
MCLog("Error setting terminous attributes");
210210
}
211211

212212
delete[] controlptr;

engine/src/exec-extension.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ Exec_stat MCExtensionCatchError(MCExecContext& ctxt)
473473
MCAutoErrorRef t_error;
474474
if (!MCErrorCatch(&t_error))
475475
{
476-
MCLog("Error state indicated with no error having been thrown", 0);
476+
MCLog("Error state indicated with no error having been thrown");
477477
return ES_ERROR;
478478
}
479479

engine/src/exec-misc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void MCMiscExecExportImageToAlbum(MCExecContext& ctxt, MCStringRef p_data_or_id,
425425

426426
if (!t_extension_found)
427427
{
428-
MCLog("Type not found", nil);
428+
MCLog("Type not found");
429429
uint4 parid;
430430
MCObject *objptr;
431431
MCChunk *tchunk = new MCChunk(False);
@@ -434,7 +434,7 @@ void MCMiscExecExportImageToAlbum(MCExecContext& ctxt, MCStringRef p_data_or_id,
434434
Parse_stat stat = tchunk->parse(sp, False);
435435
if (stat != PS_NORMAL || !tchunk->getobj(ctxt, objptr, parid, True))
436436
{
437-
MCLog("could not find image", nil);
437+
MCLog("could not find image");
438438
ctxt.SetTheResultToStaticCString("could not find image");
439439
MCerrorlock--;
440440
delete tchunk;
@@ -443,7 +443,7 @@ void MCMiscExecExportImageToAlbum(MCExecContext& ctxt, MCStringRef p_data_or_id,
443443

444444
if (objptr -> gettype() != CT_IMAGE)
445445
{
446-
MCLog("not an image", nil);
446+
MCLog("not an image");
447447
ctxt.SetTheResultToStaticCString("not an image");
448448
return;
449449
}
@@ -464,7 +464,7 @@ void MCMiscExecExportImageToAlbum(MCExecContext& ctxt, MCStringRef p_data_or_id,
464464
}
465465
else
466466
{
467-
MCLog("not a supported image", nil);
467+
MCLog("not a supported image");
468468
ctxt.SetTheResultToStaticCString("not a supported format");
469469
return;
470470
}

engine/src/mblandroidcalendar.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ void MCAndroidCalendarFinalize(void)
7777
bool MCSystemShowEvent(MCStringRef p_calendar_event_id, MCStringRef& r_result)
7878
{
7979
// TODO - IMPLEMENT SUPPORT FOR API LEVEL 14
80-
MCLog("MCSystemShowCalendarEvent", NULL);
80+
MCLog("MCSystemShowCalendarEvent");
8181
MCAndroidEngineRemoteCall("showCalendarEvent", "vx", nil, p_calendar_event_id);
8282
s_calendar_event_status = kMCAndroidCalendarEventWaiting;
8383
while (s_calendar_event_status == kMCAndroidCalendarEventWaiting)
8484
MCscreen->wait(60.0, False, True);
8585
r_result = MCValueRetain(s_calendar_event_selected);
86-
MCLog("MCSystemShowCalendarEvent - finished", NULL);
86+
MCLog("MCSystemShowCalendarEvent - finished");
8787
return true;
8888
}
8989

@@ -106,12 +106,12 @@ void MCAndroidShowCalendarEventCanceled(MCStringRef p_calendar_event_id)
106106
bool MCSystemCreateEvent(MCStringRef& r_result)
107107
{
108108
// TODO - IMPLEMENT SUPPORT FOR API LEVEL 14
109-
MCLog("MCSystemCreateCalendarEvent", NULL);
109+
MCLog("MCSystemCreateCalendarEvent");
110110
MCAndroidEngineRemoteCall("createCalendarEvent", "v", nil);
111111
s_calendar_event_status = kMCAndroidCalendarEventWaiting;
112112
while (s_calendar_event_status == kMCAndroidCalendarEventWaiting)
113113
MCscreen->wait(60.0, False, True);
114-
MCLog("MCSystemCreateCalendarEvent - finished", NULL);
114+
MCLog("MCSystemCreateCalendarEvent - finished");
115115
return true;
116116
}
117117

@@ -134,14 +134,14 @@ void MCAndroidCreateCalendarEventCanceled(MCStringRef p_calendar_event_id)
134134
bool MCSystemUpdateEvent(MCStringRef p_new_calendar_event_data, MCStringRef& r_result)
135135
{
136136
// TODO - IMPLEMENT SUPPORT FOR API LEVEL 14
137-
MCLog("MCSystemUpdateCalendarEvent", NULL);
137+
MCLog("MCSystemUpdateCalendarEvent");
138138
MCAndroidEngineRemoteCall("updateCalendarEvent", "vx", nil, p_new_calendar_event_data);
139139
s_calendar_event_status = kMCAndroidCalendarEventWaiting;
140140
while (s_calendar_event_status == kMCAndroidCalendarEventWaiting)
141141
MCscreen->wait(60.0, False, True);
142142

143143
r_result = MCValueRetain(s_calendar_event_selected);
144-
MCLog("MCSystemUpdateCalendarEvent - finished", NULL);
144+
MCLog("MCSystemUpdateCalendarEvent - finished");
145145

146146
return true;
147147
}
@@ -184,7 +184,7 @@ bool MCSystemRemoveEvent(MCStringRef p_calendar_event_id, bool p_reoccurring, MC
184184
bool MCSystemAddEvent(MCCalendar p_new_calendar_event_data, MCStringRef& r_result)
185185
{
186186
// TODO - IMPLEMENT SUPPORT FOR API LEVEL 14
187-
MCLog("MCSystemAddCalendarEvent", NULL);
187+
MCLog("MCSystemAddCalendarEvent");
188188
MCAndroidEngineRemoteCall("addCalendarEvent", "xxxxxbbbbiixiix", &r_result,
189189
p_new_calendar_event_data.mceventid, p_new_calendar_event_data.mctitle,
190190
p_new_calendar_event_data.mcnote, p_new_calendar_event_data.mclocation,

engine/src/mblandroidcontact.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static MCString s_contacts_selected = "";
6060

6161
bool MCSystemPickContact(int32_t& r_result)
6262
{
63-
MCLog("MCSystemPickContact", NULL);
63+
MCLog("MCSystemPickContact");
6464
MCAndroidEngineRemoteCall("pickContact", "i", &r_result);
6565
s_contact_status = kMCAndroidContactWaiting;
6666
while (s_contact_status == kMCAndroidContactWaiting)
@@ -110,7 +110,7 @@ void MCAndroidShowContactCanceled(int32_t p_contact_id)
110110

111111
bool MCSystemCreateContact(int32_t& r_result)
112112
{
113-
MCLog("MCSystemCreateContact", NULL);
113+
MCLog("MCSystemCreateContact");
114114
MCAndroidEngineRemoteCall("createContact", "i", &r_result);
115115
s_contact_status = kMCAndroidContactWaiting;
116116
while (s_contact_status == kMCAndroidContactWaiting)
@@ -156,7 +156,7 @@ bool MCSystemUpdateContact(MCArrayRef p_contact,
156156
MCStringRef p_title, MCStringRef p_message, MCStringRef p_alternate_name,
157157
int32_t &r_result)
158158
{
159-
MCLog("MCSystemUpdateContact", NULL);
159+
MCLog("MCSystemUpdateContact");
160160
bool t_success = true;
161161

162162
jobject t_map = nil;
@@ -215,7 +215,7 @@ bool MCSystemRemoveContact(int32_t p_contact_id)
215215

216216
bool MCSystemAddContact(MCArrayRef p_contact, int32_t &r_result)
217217
{
218-
MCLog("MCSystemAddContact", NULL);
218+
MCLog("MCSystemAddContact");
219219

220220
bool t_success = true;
221221
jobject t_map = nil;

engine/src/mblandroiddc.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,11 +1289,11 @@ static void *mobile_main(void *arg)
12891289

12901290
// Initialize and the run the main loop
12911291

1292-
MCLog("Calling X_init", 0);
1292+
MCLog("Calling X_init");
12931293

12941294
if (!X_init(argc, t_args, envc, t_env))
12951295
{
1296-
MCLog("X_init failed", 0);
1296+
MCLog("X_init failed");
12971297

12981298
// IM-2013-05-01: [[ BZ 10586 ]] signal java ui thread to exit
12991299
// finish LiveCodeActivity
@@ -1312,7 +1312,7 @@ static void *mobile_main(void *arg)
13121312
return (void *)1;
13131313
}
13141314

1315-
MCLog("Calling mode initialize", 0);
1315+
MCLog("Calling mode initialize");
13161316

13171317
// Load device-specific configuration
13181318
MCAndroidLoadDeviceConfiguration();
@@ -1325,7 +1325,7 @@ static void *mobile_main(void *arg)
13251325
while(s_android_bitmap == nil)
13261326
co_yield_to_android();
13271327

1328-
MCLog("Starting up project", 0);
1328+
MCLog("Starting up project");
13291329
send_startup_message(false);
13301330

13311331
// PM-2015-02-02: [[ Bug 14456 ]] Make sure the billing provider is properly initialized before a preopenstack/openstack message is sent
@@ -1334,7 +1334,7 @@ static void *mobile_main(void *arg)
13341334
if (!MCquit)
13351335
MCdispatcher -> gethome() -> open();
13361336

1337-
MCLog("Hiding splash screen", 0);
1337+
MCLog("Hiding splash screen");
13381338
MCAndroidEngineRemoteCall("hideSplashScreen", "v", nil);
13391339

13401340
while(s_engine_running)
@@ -1343,9 +1343,9 @@ static void *mobile_main(void *arg)
13431343
break;
13441344
}
13451345

1346-
MCLog("Shutting down project", 0);
1346+
MCLog("Shutting down project");
13471347

1348-
MCLog("Calling X_close", 0);
1348+
MCLog("Calling X_close");
13491349
X_close();
13501350

13511351
// IM-2013-05-01: [[ BZ 10586 ]] signal java ui thread
@@ -1974,7 +1974,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doCreate(JNIEnv *env, jobj
19741974
MCModulesInitialize();
19751975
MCScriptInitialize();
19761976

1977-
MCLog("doCreate called", 0);
1977+
MCLog("doCreate called");
19781978

19791979
// Make sure the engine isn't running
19801980
s_engine_running = false;
@@ -2035,12 +2035,12 @@ JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doCreate(JNIEnv *env, jobj
20352035
// Next we yield to engine which will run until the creation phase is done.
20362036
MCLog("Yielding to engine thread to perform initialization phase", 0);
20372037
co_yield_to_engine();
2038-
MCLog("Engine has initialized", 0);
2038+
MCLog("Engine has initialized");
20392039
}
20402040

20412041
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doDestroy(JNIEnv *env, jobject object)
20422042
{
2043-
MCLog("doDestroy called", 0);
2043+
MCLog("doDestroy called");
20442044

20452045
if (!s_engine_running)
20462046
return;
@@ -2074,7 +2074,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doDestroy(JNIEnv *env, job
20742074
s_android_activity = nil;
20752075

20762076
void *t_result;
2077-
MCLog("Engine has finalized", 0);
2077+
MCLog("Engine has finalized");
20782078
s_android_engine_thread.Join(&t_result);
20792079

20802080
pthread_cond_destroy(&s_coroutine_condition);
@@ -2083,32 +2083,32 @@ JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doDestroy(JNIEnv *env, job
20832083

20842084
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doRestart(JNIEnv *env, jobject object, jobject view)
20852085
{
2086-
MCLog("doRestart called", 0);
2086+
MCLog("doRestart called");
20872087
}
20882088

20892089
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doStart(JNIEnv *env, jobject object)
20902090
{
2091-
MCLog("doStart called", 0);
2091+
MCLog("doStart called");
20922092
}
20932093

20942094
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doStop(JNIEnv *env, jobject object)
20952095
{
2096-
MCLog("doStop called", 0);
2096+
MCLog("doStop called");
20972097
}
20982098

20992099
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doPause(JNIEnv *env, jobject object)
21002100
{
2101-
MCLog("doPause called", 0);
2101+
MCLog("doPause called");
21022102
}
21032103

21042104
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doResume(JNIEnv *env, jobject object)
21052105
{
2106-
MCLog("doResume called", 0);
2106+
MCLog("doResume called");
21072107
}
21082108

21092109
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doLowMemory(JNIEnv *env, jobject object)
21102110
{
2111-
MCLog("doLowMemory called", 0);
2111+
MCLog("doLowMemory called");
21122112
static_cast<MCScreenDC *>(MCscreen) -> compact_memory();
21132113
}
21142114

@@ -2344,7 +2344,7 @@ static MCStringRef s_media_content = nil;
23442344

23452345
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doMediaDone(JNIEnv *env, jobject object, jstring p_media_content)
23462346
{
2347-
MCLog("doMediaDone called - passing arg", 0);
2347+
MCLog("doMediaDone called - passing arg");
23482348

23492349
if (s_media_content != nil)
23502350
MCValueRelease(s_media_content);
@@ -2652,7 +2652,7 @@ extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_OpenGLView_doSurfaceCh
26522652

26532653
JNIEXPORT void JNICALL Java_com_runrev_android_OpenGLView_doSurfaceCreated(JNIEnv *env, jobject object, jobject p_view)
26542654
{
2655-
MCLog("doSurfaceCreated called", 0);
2655+
MCLog("doSurfaceCreated called");
26562656

26572657
// Get the openglview methods
26582658
if (s_openglview_start_method == nil)
@@ -2684,7 +2684,7 @@ static void doSurfaceDestroyedCallback(void *)
26842684

26852685
JNIEXPORT void JNICALL Java_com_runrev_android_OpenGLView_doSurfaceDestroyed(JNIEnv *env, jobject object, jobject p_view)
26862686
{
2687-
MCLog("doSurfaceDestroyed called", 0);
2687+
MCLog("doSurfaceDestroyed called");
26882688

26892689
co_yield_to_engine_and_call(doSurfaceDestroyedCallback, nil);
26902690

@@ -2713,7 +2713,7 @@ static void doSurfaceChangedCallback(void *p_is_init)
27132713

27142714
JNIEXPORT void JNICALL Java_com_runrev_android_OpenGLView_doSurfaceChanged(JNIEnv *env, jobject object, jobject p_view)
27152715
{
2716-
MCLog("doSurfaceChanged called", 0);
2716+
MCLog("doSurfaceChanged called");
27172717

27182718
bool t_is_init;
27192719
t_is_init = false;

engine/src/mblandroidmm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ bool MCSystemPlayVideo(MCStringRef p_video)
9292

9393
void MCSystemStopVideo(void)
9494
{
95-
MCLog("MCSystemStopVideo()", nil);
95+
MCLog("MCSystemStopVideo()");
9696
MCAndroidEngineRemoteCall("stopVideo", "v", nil);
9797
}
9898

9999
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doMovieStopped(JNIEnv *env, jobject object) __attribute__((visibility("default")));
100100
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doMovieStopped(JNIEnv *env, jobject object)
101101
{
102-
MCLog("doMovieStopped", nil);
102+
MCLog("doMovieStopped");
103103
s_video_playing=false;
104104
}
105105

106106
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doMovieTouched(JNIEnv *env, jobject object) __attribute__((visibility("default")));
107107
JNIEXPORT void JNICALL Java_com_runrev_android_Engine_doMovieTouched(JNIEnv *env, jobject object)
108108
{
109-
MCLog("doMovieTouched", nil);
109+
MCLog("doMovieTouched");
110110
extern MCExecContext *MCECptr;
111111
MCEventQueuePostCustom(new MCMovieTouchedEvent(MCECptr -> GetObject()));
112112
}

engine/src/mblandroidplayer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ void MCAndroidPlayerControl::HandlePropertyAvailableEvent(const char *p_property
370370
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPlayerFinished(JNIEnv *env, jobject object) __attribute__((visibility("default")));
371371
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPlayerFinished(JNIEnv *env, jobject object)
372372
{
373-
MCLog("doPlayerFinished", nil);
373+
MCLog("doPlayerFinished");
374374
MCAndroidControl *t_control = nil;
375375

376376
if (MCAndroidControl::FindByView(object, t_control))
@@ -380,7 +380,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPlay
380380
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPlayerError(JNIEnv *env, jobject object) __attribute__((visibility("default")));
381381
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPlayerError(JNIEnv *env, jobject object)
382382
{
383-
MCLog("doPlayerError", nil);
383+
MCLog("doPlayerError");
384384
MCAndroidControl *t_control = nil;
385385

386386
if (MCAndroidControl::FindByView(object, t_control))
@@ -396,7 +396,7 @@ typedef enum
396396
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPropertyAvailable(JNIEnv *env, jobject object, jint availableProperty) __attribute__((visibility("default")));
397397
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doPropertyAvailable(JNIEnv *env, jobject object, jint availableProperty)
398398
{
399-
MCLog("doPropertyAvailable", nil);
399+
MCLog("doPropertyAvailable");
400400
MCAndroidControl *t_control = nil;
401401

402402
if (MCAndroidControl::FindByView(object, t_control))
@@ -422,7 +422,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doProp
422422
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doMovieTouched(JNIEnv *env, jobject object) __attribute__((visibility("default")));
423423
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_VideoControl_doMovieTouched(JNIEnv *env, jobject object)
424424
{
425-
MCLog("doMovieTouched", nil);
425+
MCLog("doMovieTouched");
426426
MCAndroidControl *t_control = nil;
427427

428428
if (MCAndroidControl::FindByView(object, t_control))

engine/src/mblandroidscroller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doS
507507
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doScrollBeginDrag(JNIEnv *env, jobject object) __attribute__((visibility("default")));
508508
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doScrollBeginDrag(JNIEnv *env, jobject object)
509509
{
510-
MCLog("scrollViewBeginDrag", nil);
510+
MCLog("scrollViewBeginDrag");
511511
MCAndroidControl *t_control = nil;
512512
char *t_url = nil;
513513

@@ -518,7 +518,7 @@ JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doS
518518
extern "C" JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doScrollEndDrag(JNIEnv *env, jobject object) __attribute__((visibility("default")));
519519
JNIEXPORT void JNICALL Java_com_runrev_android_nativecontrol_ScrollerControl_doScrollEndDrag(JNIEnv *env, jobject object)
520520
{
521-
MCLog("scrollViewEndDrag", nil);
521+
MCLog("scrollViewEndDrag");
522522
MCAndroidControl *t_control = nil;
523523
char *t_url = nil;
524524

0 commit comments

Comments
 (0)