aboutsummaryrefslogtreecommitdiff
path: root/tests/unit_tests/hardfork.cpp
diff options
context:
space:
mode:
authormoneroexample <moneroexample@tuta.io>2016-05-18 12:51:28 +0800
committerredfish <redfish@galactica.pw>2016-05-18 10:54:41 -0400
commitde030d99a504838c87f84fabe15f173477d3b17d (patch)
treea0de44e8e47b101c6355f6ee4bbb69ae74b02049 /tests/unit_tests/hardfork.cpp
parentcontrib: epee: add exception spec to throwing destructors (diff)
downloadmonero-de030d99a504838c87f84fabe15f173477d3b17d.tar.xz
fix: error: -Werror=misleading-indentation
Compilation of bitmonero on Arch with gcc 6.1 results in the following error: /home/mwo/bitmonero/tests/unit_tests/hardfork.cpp: In member function ‘virtual void TestDB::set_hard_fork_version(uint64_t, uint8_t)’: /home/mwo/bitmonero/tests/unit_tests/hardfork.cpp:132:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] if (versions.size() <= height) versions.resize(height+1); versions[height] = version; This can be fixed by simply unfolding this line into three lines.
Diffstat (limited to 'tests/unit_tests/hardfork.cpp')
-rw-r--r--tests/unit_tests/hardfork.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit_tests/hardfork.cpp b/tests/unit_tests/hardfork.cpp
index 6d4a100df..1d1f85945 100644
--- a/tests/unit_tests/hardfork.cpp
+++ b/tests/unit_tests/hardfork.cpp
@@ -129,7 +129,9 @@ public:
return starting_height[version];
}
virtual void set_hard_fork_version(uint64_t height, uint8_t version) {
- if (versions.size() <= height) versions.resize(height+1); versions[height] = version;
+ if (versions.size() <= height)
+ versions.resize(height+1);
+ versions[height] = version;
}
virtual uint8_t get_hard_fork_version(uint64_t height) const {
return versions[height];