Try to fix static code analysis issues.

This commit is contained in:
Ryan Curtin
2020-12-13 10:52:43 -05:00
parent 700e5ee72b
commit 6748dc2aed
3 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ void TrainWithCoordinateList(DecompositionPolicy& decomposition)
{
arma::mat randomData(3, 100);
randomData.row(0) = arma::linspace<arma::rowvec>(0, 99, 100);
randomData.row(1) = arma::linspace<arma::rowvec>(0, 99, 100);
randomData.row(1) = randomData.row(0);
randomData.row(2).fill(3);
CFType<DecompositionPolicy> c(randomData, decomposition, 5, 5, 30);
-2
View File
@@ -179,7 +179,6 @@ void GenerateNextRecursiveReber(const arma::Mat<char>& transitions,
else if (c == 'P' && state == 1)
{
numPs++;
state = 1;
}
else if (c == 'T' && state == 1)
{
@@ -206,7 +205,6 @@ void GenerateNextRecursiveReber(const arma::Mat<char>& transitions,
else if (c == 'P' && state == 5)
{
numPs--;
state = 5;
}
}
+1 -1
View File
@@ -1682,7 +1682,7 @@ TEST_CASE("CerealEmptyArrayWrapperTest", "[SerializationTest]")
jsonT.mem = new int[5];
jsonT.len = 5;
SerializeObjectAll(t, xmlT, binaryT, jsonT);
SerializeObjectAll(t, xmlT, jsonT, binaryT);
// Ensure that all the results are correct.
REQUIRE(xmlT.mem == (int*) NULL);