From f7970eb11c2aa5d26b9a387c65725119046b1ae6 Mon Sep 17 00:00:00 2001 From: MatMoul Date: Fri, 11 Nov 2016 23:42:14 +0100 Subject: [PATCH] Delete correction --- src/classes/Keyboard.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/classes/Keyboard.cpp b/src/classes/Keyboard.cpp index e7c9289..6a1410d 100644 --- a/src/classes/Keyboard.cpp +++ b/src/classes/Keyboard.cpp @@ -57,7 +57,7 @@ bool Keyboard::commit() { data[3] = 0x5a; for(int i = 4; i < 20; i++) data[i] = 0x00; retval = sendDataInternal(data, 20); - delete data; + delete[] data; return retval; } @@ -471,7 +471,7 @@ bool Keyboard::setKeysInternal(KeyAddressGroup addressGroup, KeyValue keyValues[ } } retval = sendDataInternal(data, data_size); - delete data; + delete[] data; return retval; } @@ -495,7 +495,7 @@ bool Keyboard::setPowerOnEffect(PowerOnEffect powerOnEffect) { } for(int i = 7; i < data_size; i++) data[i] = 0x00; retval = sendDataInternal(data, data_size); - delete data; + delete[] data; return retval; } @@ -518,7 +518,7 @@ bool Keyboard::setKey(KeyValue keyValue) { data[11] = keyValue.colors.blue; for(int i = 12; i < data_size; i++) data[i] = 0x00; retval = sendDataInternal(data, data_size); - delete data; + delete[] data; return retval; }