aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/undo.h
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-02 00:18:52 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-02 00:18:52 +0100
commit7b0e9feee71bf739331d5bd6a4d7a73d163c7370 (patch)
tree7031c8e330993d350e9610dbbd844c1efa064e37 /src/undo.h
parent800bbd8a13ccee0a82b61a47a04b01d1b2b68976 (diff)
downloadsciteco-7b0e9feee71bf739331d5bd6a4d7a73d163c7370.tar.gz
minor optimization: no need to check for NULL when using C++ delete operator
Diffstat (limited to 'src/undo.h')
-rw-r--r--src/undo.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/undo.h b/src/undo.h
index 028d73c..9fc5925 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -145,15 +145,13 @@ public:
~UndoTokenObject()
{
- if (obj)
- delete obj;
+ delete obj;
}
void
run(void)
{
- if (*ptr)
- delete *ptr;
+ delete *ptr;
*ptr = obj;
obj = NULL;
}