Commit 0228a728 authored by David Fairbrother's avatar David Fairbrother
Browse files

Remove unused vars from cppcheck 1.9

parent 2357c748
......@@ -215,7 +215,6 @@ public:
}
void testGetInstrument() {
std::string name; // place to put results
ConfigService::Instance().setFacility("ISIS");
ConfigService::Instance().setString("default.instrument", "HRPD");
......
......@@ -87,7 +87,6 @@ public:
void test_Assignment_By_SharedPtr() {
FunctionProperty prop("fun");
std::string error;
auto fun_p = FunctionFactory::Instance().createInitialized(
createTestFunctionString());
TS_ASSERT(fun_p);
......
......@@ -358,8 +358,6 @@ public:
/** Generate a workspace contains PG3_4866 5-th peak
*/
MatrixWorkspace_sptr gen_PG3DiamondData() {
vector<double> vecx, vecy, vece;
size_t NVectors = 1;
size_t size = 53;
MatrixWorkspace_sptr ws = boost::dynamic_pointer_cast<MatrixWorkspace>(
......
......@@ -503,7 +503,7 @@ public:
TS_ASSERT_DELTA(zeros[2], 7.85, 1.e-3);
}
void test_binRanges() {
std::vector<size_t> bin_min, bin_max, zeros;
std::vector<size_t> bin_min, bin_max;
// Index 0 1 2 3 4 5 6 7 8 9 10 11 12 13
double debin[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15};
std::vector<double> ebin(debin, debin + sizeof(debin) / sizeof(double));
......
......@@ -106,7 +106,6 @@ public:
// The box to test.
const coord_t boxMin = 1.1f;
const coord_t boxMax = 1.9f;
std::vector<coord_t> boxVertexes;
std::vector<Extent> extents;
// extent
extents.emplace_back(Extent(boxMin, boxMax));
......
......@@ -144,7 +144,6 @@ public:
}
void testStrFullCut() {
std::vector<double> dblresult;
double sgldblResult;
std::string input("100.01 101.02 103.04 105.06 Remainder of string");
TS_ASSERT_EQUALS(
......
......@@ -51,8 +51,6 @@ public:
void test_JSONArray() {
std::string str = "json failure here";
std::istringstream input(str);
std::string res;
JSONArray ja;
TS_ASSERT_THROWS_NOTHING(ja.emplace_back(str));
......@@ -64,11 +62,10 @@ public:
}
void test_JSONObjectWrongStrings() {
std::string str = "json failure here";
std::istringstream input(str);
std::istringstream input;
std::string res;
str = "";
std::string str = "";
JSONObject jo;
TS_ASSERT_THROWS(initFromStream(jo, input), const JSONParseException &);
TS_ASSERT_THROWS_NOTHING(jo["no_param"].getValue(res));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment