From 7fc4efc7a0216aeb68b0639fb3f4d839b359e250 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 12 Jan 2010 21:58:24 +0000 Subject: references are better than pointer ;) --- src/sysExec.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/sysExec.cpp') diff --git a/src/sysExec.cpp b/src/sysExec.cpp index b6f47d8..005e2cc 100644 --- a/src/sysExec.cpp +++ b/src/sysExec.cpp @@ -176,12 +176,12 @@ int SysExec::getReturnCode() const return return_code_; } -void SysExec::waitAndDestroy(SysExec** s) +void SysExec::waitAndDestroy(SysExec*& s) { - if(!s && !(*s)) + if(!s) return; - (*s)->waitForScript(); - delete(*s); - *s = NULL; + s->waitForScript(); + delete(s); + s = NULL; } -- cgit v1.2.3