16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 20:59:19 +02:00

maintenance: fixes for some of cppcheck warnings

This commit is contained in:
tmj-fstate
2019-10-24 23:03:39 +02:00
parent 27d5b55ca6
commit d24fccb4d7
14 changed files with 113 additions and 134 deletions

View File

@@ -8416,10 +8416,11 @@ bool TMoverParameters::readCompressorList(std::string const &Input) {
return false;
}
int idx = LISTLINE++;
if (idx > 8) {
if (idx > 8 - 1) {
WriteLog("Read CompressorList: number of entries exceeded capacity of the data table");
return false;
}
// NOTE: content of slot [x][0] is hardcoded elsewhere
parser
>> CompressorList[ 0 ][ idx + 1 ]
>> CompressorList[ 1 ][ idx + 1 ]

View File

@@ -130,7 +130,7 @@ static double const BPT_394[7][2] = { {13 , 10.0} , {5 , 5.0} , {0 , -1} , {5 ,
//double *BPT_394 = zero_based_BPT_394[1]; //tablica pozycji hamulca dla zakresu -1..5
// BPT: array[-2..6] of array [0..1] of real= ((0, 5.0), (12, 5.4), (9, 5.0), (9, 4.6), (9, 4.2), (9, 3.8), (9, 3.4), (9, 2.8), (34, 2.8));
// BPT: array[-2..6] of array [0..1] of real= ((0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0),(0, 0));
static int const i_bcpno = 6;
static int const i_bcpno = 5;
// static double const pi = 3.141592653589793; //definicja w mctools
enum TUniversalBrake // możliwe działania uniwersalnego przycisku hamulca