Cleanup code using forward declarations.

Use misc methods of avoiding unnecesary header includes.
Replace int typedefs with int##_t from stdint.h.
Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h.
Normalize QT_VERSION ifs where possible.
Resolve some indirect dependencies as direct ones.
Remove extern declarations from .cpp files.
This commit is contained in:
Brandon Dahler
2013-04-13 00:13:08 -05:00
parent 7c4c207be8
commit 51ed9ec971
177 changed files with 2084 additions and 1681 deletions

View File

@@ -1,8 +1,9 @@
#include <boost/test/unit_test.hpp>
#include <limits>
#include "bignum.h"
#include "util.h"
#include <limits>
#include <stdint.h>
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_SUITE(bignum_tests)
@@ -46,7 +47,7 @@ BOOST_AUTO_TEST_SUITE(bignum_tests)
// Let's force this code not to be inlined, in order to actually
// test a generic version of the function. This increases the chance
// that -ftrapv will detect overflows.
NOINLINE void mysetint64(CBigNum& num, int64 n)
NOINLINE void mysetint64(CBigNum& num, int64_t n)
{
num.setint64(n);
}
@@ -55,7 +56,7 @@ NOINLINE void mysetint64(CBigNum& num, int64 n)
// value to 0, then the second one with a non-inlined function.
BOOST_AUTO_TEST_CASE(bignum_setint64)
{
int64 n;
int64_t n;
{
n = 0;
@@ -103,7 +104,7 @@ BOOST_AUTO_TEST_CASE(bignum_setint64)
BOOST_CHECK(num.ToString() == "-5");
}
{
n = std::numeric_limits<int64>::min();
n = std::numeric_limits<int64_t>::min();
CBigNum num(n);
BOOST_CHECK(num.ToString() == "-9223372036854775808");
num.setulong(0);
@@ -112,7 +113,7 @@ BOOST_AUTO_TEST_CASE(bignum_setint64)
BOOST_CHECK(num.ToString() == "-9223372036854775808");
}
{
n = std::numeric_limits<int64>::max();
n = std::numeric_limits<int64_t>::max();
CBigNum num(n);
BOOST_CHECK(num.ToString() == "9223372036854775807");
num.setulong(0);