diff options
author | Jaromir Wysoglad | 2019-07-22 10:47:06 +0200 |
---|---|---|
committer | Thierry Crozat | 2019-07-28 15:09:14 +0100 |
commit | fc3ae4c9b955f6b7e702993f38c25f61d49b593c (patch) | |
tree | e510c636593f3f932e1ad6316ad9682180fcb68e /devtools/create_supernova | |
parent | c2177f84539472defe31c6fba80ad4a6f3357266 (diff) | |
download | scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.tar.gz scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.tar.bz2 scummvm-rg350-fc3ae4c9b955f6b7e702993f38c25f61d49b593c.zip |
SUPERNOVA: Fix most of Codacy issues
* Fix mismatched delete in create_image.cpp
* Add shebangs to create_ms2_data.***.sh
* Reduce scopes of some variables
* Substitute bitwise and for logical and in
GamaManager2::passageConstruction
Diffstat (limited to 'devtools/create_supernova')
4 files changed, 6 insertions, 2 deletions
diff --git a/devtools/create_supernova/create_image/create_image.cpp b/devtools/create_supernova/create_image/create_image.cpp index 1bf1e24f7c..6f71a0c440 100644 --- a/devtools/create_supernova/create_image/create_image.cpp +++ b/devtools/create_supernova/create_image/create_image.cpp @@ -120,7 +120,7 @@ int writePixelData(std::ofstream &output, int imageNum, int skip) { char *buf = new char[length]; image.read(buf, length); output.write(buf, length); - delete buf; + delete[] buf; return length; } diff --git a/devtools/create_supernova/create_image/create_ms2_data.015.sh b/devtools/create_supernova/create_image/create_ms2_data.015.sh index 883cff6046..be3b253a57 100755 --- a/devtools/create_supernova/create_image/create_ms2_data.015.sh +++ b/devtools/create_supernova/create_image/create_ms2_data.015.sh @@ -1,3 +1,3 @@ -#!/bin/bash +#!/bin/sh ./create_image ms2_data 15 1146 diff --git a/devtools/create_supernova/create_image/create_ms2_data.027.sh b/devtools/create_supernova/create_image/create_ms2_data.027.sh index f9a744172e..fcac9442a8 100755 --- a/devtools/create_supernova/create_image/create_ms2_data.027.sh +++ b/devtools/create_supernova/create_image/create_ms2_data.027.sh @@ -1 +1,3 @@ +#!/bin/sh + ./create_image ms2_data 27 1146 diff --git a/devtools/create_supernova/create_image/create_ms2_data.028.sh b/devtools/create_supernova/create_image/create_ms2_data.028.sh index 66fda85204..1ebc280dd9 100755 --- a/devtools/create_supernova/create_image/create_ms2_data.028.sh +++ b/devtools/create_supernova/create_image/create_ms2_data.028.sh @@ -1 +1,3 @@ +#!/bin/sh + ./create_image ms2_data 28 829 |