From: joncruz Date: Mon, 8 Dec 2008 07:15:15 +0000 (+0000) Subject: Warning and 'using' cleanup. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c0092c87b724182672defa4f5f75a82c27f017dc;p=inkscape.git Warning and 'using' cleanup. --- diff --git a/src/attributes-test.h b/src/attributes-test.h index 381821cd8..bffc27798 100644 --- a/src/attributes-test.h +++ b/src/attributes-test.h @@ -509,9 +509,9 @@ struct {char const *attr; bool supported;} const all_attrs[] = { } TS_ASSERT(!found); - for ( guint index = 1; index < n_ids; index++ ) { + for ( unsigned int index = 1; index < n_ids; index++ ) { guchar const* name = sp_attribute_name(index); - gint postLookup = sp_attribute_lookup( reinterpret_cast(name) ); + unsigned int postLookup = sp_attribute_lookup( reinterpret_cast(name) ); TSM_ASSERT_EQUALS( std::string("Enum round-trip through string {") + (char const*)name + "} failed.", index, postLookup ); } diff --git a/src/color-profile-test.h b/src/color-profile-test.h index 5cd58c15c..cdbf76b44 100644 --- a/src/color-profile-test.h +++ b/src/color-profile-test.h @@ -11,8 +11,6 @@ #include "color-profile.h" #include "color-profile-fns.h" -using Inkscape::ColorProfile; - class ColorProfileTest : public CxxTest::TestSuite { public: @@ -33,7 +31,7 @@ public: static void createSuiteSubclass( ColorProfileTest*& dst ) { - ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); + Inkscape::ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); if ( prof ) { if ( prof->rendering_intent == (guint)Inkscape::RENDERING_INTENT_UNKNOWN ) { TS_ASSERT_EQUALS( prof->rendering_intent, (guint)Inkscape::RENDERING_INTENT_UNKNOWN ); @@ -76,7 +74,7 @@ public: {"auto2", (guint)Inkscape::RENDERING_INTENT_UNKNOWN}, }; - ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); + Inkscape::ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); TS_ASSERT( prof ); SP_OBJECT(prof)->document = _doc; @@ -96,7 +94,7 @@ public: "something", }; - ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); + Inkscape::ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); TS_ASSERT( prof ); SP_OBJECT(prof)->document = _doc; @@ -120,7 +118,7 @@ public: "something", }; - ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); + Inkscape::ColorProfile *prof = static_cast(g_object_new(COLORPROFILE_TYPE, NULL)); TS_ASSERT( prof ); SP_OBJECT(prof)->document = _doc; diff --git a/src/display/bezier-utils-test.h b/src/display/bezier-utils-test.h index cc24adaad..3be643568 100644 --- a/src/display/bezier-utils-test.h +++ b/src/display/bezier-utils-test.h @@ -21,9 +21,8 @@ static bool range_approx_equal(double const a[], double const b[], unsigned cons static inline bool point_approx_equal(Geom::Point const &a, Geom::Point const &b, double const eps) { - using Geom::X; using Geom::Y; - return ( NR_DF_TEST_CLOSE(a[X], b[X], eps) && - NR_DF_TEST_CLOSE(a[Y], b[Y], eps) ); + return ( NR_DF_TEST_CLOSE(a[Geom::X], b[Geom::X], eps) && + NR_DF_TEST_CLOSE(a[Geom::Y], b[Geom::Y], eps) ); } static inline double square(double const x) { diff --git a/src/libnr/nr-matrix-test.h b/src/libnr/nr-matrix-test.h index b5c15b60b..d4267ffa5 100644 --- a/src/libnr/nr-matrix-test.h +++ b/src/libnr/nr-matrix-test.h @@ -13,14 +13,11 @@ #include #include #include -using NR::Matrix; -using NR::X; -using NR::Y; inline bool point_equalp(NR::Point const &a, NR::Point const &b) { - return ( NR_DF_TEST_CLOSE(a[X], b[X], 1e-5) && - NR_DF_TEST_CLOSE(a[Y], b[Y], 1e-5) ); + return ( NR_DF_TEST_CLOSE(a[NR::X], b[NR::X], 1e-5) && + NR_DF_TEST_CLOSE(a[NR::Y], b[NR::Y], 1e-5) ); } class NrMatrixTest : public CxxTest::TestSuite @@ -47,10 +44,10 @@ public: static NrMatrixTest *createSuite() { return new NrMatrixTest(); } static void destroySuite( NrMatrixTest *suite ) { delete suite; } - Matrix const m_id; + NR::Matrix const m_id; NR::rotate const r_id; NR::translate const t_id; - Matrix const c16; + NR::Matrix const c16; NR::rotate const r86; NR::Matrix const mr86; NR::translate const t23; @@ -61,8 +58,8 @@ public: void testCtorsAssignmentOp(void) { - Matrix const c16_copy(c16); - Matrix c16_eq(m_id); + NR::Matrix const c16_copy(c16); + NR::Matrix c16_eq(m_id); c16_eq = c16; for(unsigned i = 0; i < 6; ++i) { TS_ASSERT_EQUALS( c16[i], 1.0 + i ); @@ -89,7 +86,7 @@ public: TS_ASSERT_EQUALS( p0 * mr86, NR::Point(.8, .6) ); TS_ASSERT_EQUALS( p90 * r86, NR::Point(-.6, .8) ); TS_ASSERT_EQUALS( p90 * mr86, NR::Point(-.6, .8) ); - TS_ASSERT( matrix_equalp(Matrix( r86 * r86 ), + TS_ASSERT( matrix_equalp(NR::Matrix( r86 * r86 ), mr86 * mr86, 1e-14) ); } @@ -104,26 +101,26 @@ public: void testIdentity(void) { TS_ASSERT( m_id.test_identity() ); - TS_ASSERT( Matrix(t_id).test_identity() ); - TS_ASSERT( !(Matrix(NR::translate(-2, 3)).test_identity()) ); - TS_ASSERT( Matrix(r_id).test_identity() ); + TS_ASSERT( NR::Matrix(t_id).test_identity() ); + TS_ASSERT( !(NR::Matrix(NR::translate(-2, 3)).test_identity()) ); + TS_ASSERT( NR::Matrix(r_id).test_identity() ); NR::rotate const rot180(NR::Point(-1, 0)); - TS_ASSERT( !(Matrix(rot180).test_identity()) ); - TS_ASSERT( Matrix(s_id).test_identity() ); - TS_ASSERT( !(Matrix(NR::scale(1.0, 0.0)).test_identity()) ); - TS_ASSERT( !(Matrix(NR::scale(0.0, 1.0)).test_identity()) ); - TS_ASSERT( !(Matrix(NR::scale(1.0, -1.0)).test_identity()) ); - TS_ASSERT( !(Matrix(NR::scale(-1.0, -1.0)).test_identity()) ); + TS_ASSERT( !(NR::Matrix(rot180).test_identity()) ); + TS_ASSERT( NR::Matrix(s_id).test_identity() ); + TS_ASSERT( !(NR::Matrix(NR::scale(1.0, 0.0)).test_identity()) ); + TS_ASSERT( !(NR::Matrix(NR::scale(0.0, 1.0)).test_identity()) ); + TS_ASSERT( !(NR::Matrix(NR::scale(1.0, -1.0)).test_identity()) ); + TS_ASSERT( !(NR::Matrix(NR::scale(-1.0, -1.0)).test_identity()) ); } void testInverse(void) { TS_ASSERT_EQUALS( m_id.inverse(), m_id ); - TS_ASSERT_EQUALS( Matrix(t23).inverse(), Matrix(NR::translate(-2.0, -3.0)) ); + TS_ASSERT_EQUALS( NR::Matrix(t23).inverse(), NR::Matrix(NR::translate(-2.0, -3.0)) ); NR::scale const s2(-4.0, 2.0); NR::scale const sp5(-.25, .5); - TS_ASSERT_EQUALS( Matrix(s2).inverse(), Matrix(sp5) ); - TS_ASSERT_EQUALS( Matrix(sp5).inverse(), Matrix(s2) ); + TS_ASSERT_EQUALS( NR::Matrix(s2).inverse(), NR::Matrix(sp5) ); + TS_ASSERT_EQUALS( NR::Matrix(sp5).inverse(), NR::Matrix(s2) ); } void testEllipticQuadraticForm(void) diff --git a/src/libnr/nr-point-fns-test.h b/src/libnr/nr-point-fns-test.h index bd6605802..7d28c9c0e 100644 --- a/src/libnr/nr-point-fns-test.h +++ b/src/libnr/nr-point-fns-test.h @@ -9,8 +9,6 @@ #include "libnr/nr-point-fns.h" #include "2geom/isnan.h" -using NR::Point; - class NrPointFnsTest : public CxxTest::TestSuite { public: @@ -46,16 +44,16 @@ public: } bool setupValid; - Point const p3n4; - Point const p0; + NR::Point const p3n4; + NR::Point const p0; double const small; double const inf; double const nan; - Point const small_left; - Point const small_n3_4; - Point const part_nan; - Point const inf_left; + NR::Point const small_left; + NR::Point const small_n3_4; + NR::Point const part_nan; + NR::Point const inf_left; void testL1(void) @@ -107,9 +105,9 @@ public: void testUnitVector(void) { - TS_ASSERT_EQUALS( NR::unit_vector(p3n4), Point(.6, -0.8) ); - TS_ASSERT_EQUALS( NR::unit_vector(small_left), Point(-1.0, 0.0) ); - TS_ASSERT_EQUALS( NR::unit_vector(small_n3_4), Point(-.6, 0.8) ); + TS_ASSERT_EQUALS( NR::unit_vector(p3n4), NR::Point(.6, -0.8) ); + TS_ASSERT_EQUALS( NR::unit_vector(small_left), NR::Point(-1.0, 0.0) ); + TS_ASSERT_EQUALS( NR::unit_vector(small_n3_4), NR::Point(-.6, 0.8) ); } void testIsUnitVector(void) @@ -119,13 +117,13 @@ public: TS_ASSERT( !NR::is_unit_vector(small_n3_4) ); TS_ASSERT( !NR::is_unit_vector(part_nan) ); TS_ASSERT( !NR::is_unit_vector(inf_left) ); - TS_ASSERT( !NR::is_unit_vector(Point(.5, 0.5)) ); - TS_ASSERT( NR::is_unit_vector(Point(.6, -0.8)) ); - TS_ASSERT( NR::is_unit_vector(Point(-.6, 0.8)) ); - TS_ASSERT( NR::is_unit_vector(Point(-1.0, 0.0)) ); - TS_ASSERT( NR::is_unit_vector(Point(1.0, 0.0)) ); - TS_ASSERT( NR::is_unit_vector(Point(0.0, -1.0)) ); - TS_ASSERT( NR::is_unit_vector(Point(0.0, 1.0)) ); + TS_ASSERT( !NR::is_unit_vector(NR::Point(.5, 0.5)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(.6, -0.8)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(-.6, 0.8)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(-1.0, 0.0)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(1.0, 0.0)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(0.0, -1.0)) ); + TS_ASSERT( NR::is_unit_vector(NR::Point(0.0, 1.0)) ); } }; diff --git a/src/libnr/nr-rotate-test.h b/src/libnr/nr-rotate-test.h index 252b25022..5514d09d1 100644 --- a/src/libnr/nr-rotate-test.h +++ b/src/libnr/nr-rotate-test.h @@ -8,8 +8,6 @@ #include #include #include -using NR::X; -using NR::Y; class NrRotateTest : public CxxTest::TestSuite diff --git a/src/libnr/nr-scale-test.h b/src/libnr/nr-scale-test.h index dc5e6ef28..938e8e14d 100644 --- a/src/libnr/nr-scale-test.h +++ b/src/libnr/nr-scale-test.h @@ -2,8 +2,6 @@ #include #include -using NR::X; -using NR::Y; class NrScaleTest : public CxxTest::TestSuite { @@ -30,8 +28,8 @@ public: void testXY_CtorArrayOperator(void) { - TS_ASSERT_EQUALS( sa[X], 1.5 ); - TS_ASSERT_EQUALS( sa[Y], 2.0 ); + TS_ASSERT_EQUALS( sa[NR::X], 1.5 ); + TS_ASSERT_EQUALS( sa[NR::Y], 2.0 ); TS_ASSERT_EQUALS( sa[0u], 1.5 ); TS_ASSERT_EQUALS( sa[1u], 2.0 ); } @@ -54,8 +52,8 @@ public: void testPointCtor(void) { - TS_ASSERT_EQUALS( sb[X], b[X] ); - TS_ASSERT_EQUALS( sb[Y], b[Y] ); + TS_ASSERT_EQUALS( sb[NR::X], b[NR::X] ); + TS_ASSERT_EQUALS( sb[NR::Y], b[NR::Y] ); } void testOpStarPointScale(void) diff --git a/src/libnr/nr-translate-test.h b/src/libnr/nr-translate-test.h index 20b537a45..630f43523 100644 --- a/src/libnr/nr-translate-test.h +++ b/src/libnr/nr-translate-test.h @@ -7,8 +7,6 @@ #include #include #include -using NR::X; -using NR::Y; class NrTranslateTest : public CxxTest::TestSuite { @@ -40,11 +38,11 @@ public: void testCtorsArrayOperator(void) { - TS_ASSERT_EQUALS( tc[X], -3.0 ); - TS_ASSERT_EQUALS( tc[Y], -2.0 ); + TS_ASSERT_EQUALS( tc[NR::X], -3.0 ); + TS_ASSERT_EQUALS( tc[NR::Y], -2.0 ); - TS_ASSERT_EQUALS( tb[0], b[X] ); - TS_ASSERT_EQUALS( tb[1], b[Y] ); + TS_ASSERT_EQUALS( tb[0], b[NR::X] ); + TS_ASSERT_EQUALS( tb[1], b[NR::Y] ); } void testAssignmentOperator(void) diff --git a/src/libnr/nr-types-test.h b/src/libnr/nr-types-test.h index d51db1be7..e472c2d29 100644 --- a/src/libnr/nr-types-test.h +++ b/src/libnr/nr-types-test.h @@ -4,9 +4,6 @@ #include "libnr/nr-types.h" #include "libnr/nr-point-fns.h" #include -using NR::Point; -using NR::X; -using NR::Y; class NrTypesTest : public CxxTest::TestSuite { @@ -30,20 +27,20 @@ public: NR::Point const b; NR::Point const ab; double const small; - Point const small_left; - Point const smallish_3_neg4; + NR::Point const small_left; + NR::Point const smallish_3_neg4; void testXYValues( void ) { - TS_ASSERT_EQUALS( X, 0 ); - TS_ASSERT_EQUALS( Y, 1 ); + TS_ASSERT_EQUALS( NR::X, 0 ); + TS_ASSERT_EQUALS( NR::Y, 1 ); } void testXYCtorAndArrayConst(void) { - TS_ASSERT_EQUALS( a[X], 1.5 ); - TS_ASSERT_EQUALS( a[Y], 2.0 ); + TS_ASSERT_EQUALS( a[NR::X], 1.5 ); + TS_ASSERT_EQUALS( a[NR::Y], 2.0 ); } void testCopyCtor(void) @@ -57,10 +54,10 @@ public: void testNonConstArrayOperator(void) { NR::Point a_copy(a); - a_copy[X] = -2.0; + a_copy[NR::X] = -2.0; TS_ASSERT_DIFFERS( a_copy, a ); TS_ASSERT_DIFFERS( a_copy, b ); - a_copy[Y] = 3.0; + a_copy[NR::Y] = 3.0; TS_ASSERT_EQUALS( a_copy, b ); } @@ -75,7 +72,7 @@ public: void testUnaryMinus(void) { - TS_ASSERT_EQUALS( -a, Point(-a[X], -a[Y]) ); + TS_ASSERT_EQUALS( -a, NR::Point(-a[NR::X], -a[NR::Y]) ); } void tetScaleDivide(void) @@ -87,8 +84,8 @@ public: void testDot(void) { - TS_ASSERT_EQUALS( dot(a, b), ( a[X] * b[X] + - a[Y] * b[Y] ) ); + TS_ASSERT_EQUALS( dot(a, b), ( a[NR::X] * b[NR::X] + + a[NR::Y] * b[NR::Y] ) ); TS_ASSERT_EQUALS( dot(a, NR::rot90(a)), 0.0 ); TS_ASSERT_EQUALS( dot(-a, NR::rot90(a)), 0.0 ); } @@ -108,27 +105,27 @@ public: void testOperatorPlusEquals(void) { - Point x(a); + NR::Point x(a); x += b; TS_ASSERT_EQUALS( x, ab ); } void tetOperatorDivEquals(void) { - Point x(a); + NR::Point x(a); x /= .5; TS_ASSERT_EQUALS( x, a + a ); } void testNormalize(void) { - Point x(small_left); + NR::Point x(small_left); x.normalize(); - TS_ASSERT_EQUALS( x, Point(-1.0, 0.0) ); + TS_ASSERT_EQUALS( x, NR::Point(-1.0, 0.0) ); x = smallish_3_neg4; x.normalize(); - TS_ASSERT_EQUALS( x, Point(0.6, -0.8) ); + TS_ASSERT_EQUALS( x, NR::Point(0.6, -0.8) ); } }; diff --git a/src/svg/css-ostringstream-test.h b/src/svg/css-ostringstream-test.h index ffe15ee9a..5656baf5c 100644 --- a/src/svg/css-ostringstream-test.h +++ b/src/svg/css-ostringstream-test.h @@ -2,8 +2,8 @@ #include "svg/css-ostringstream.h" // dummy functions to prevent link errors -int sp_main_gui(int argc, char const **argv) { return 0; } -int sp_main_console(int argc, char const **argv) { return 0; } +int sp_main_gui(int /*argc*/, char const **/*argv*/) { return 0; } +int sp_main_console(int /*argc*/, char const **/*argv*/) { return 0; } template static void diff --git a/src/svg/svg-color-test.h b/src/svg/svg-color-test.h index d249c675c..49af63a5d 100644 --- a/src/svg/svg-color-test.h +++ b/src/svg/svg-color-test.h @@ -52,9 +52,8 @@ public: } /* And a few completely random ones. */ - using std::rand; for (unsigned i = 500; i--;) { /* Arbitrary number of iterations. */ - unsigned const rgb24 = (rand() >> 4) & 0xffffff; + unsigned const rgb24 = (std::rand() >> 4) & 0xffffff; check_rgb24(rgb24); } } diff --git a/src/util/list-container-test.h b/src/util/list-container-test.h index 08e7cfa41..c2db79fee 100644 --- a/src/util/list-container-test.h +++ b/src/util/list-container-test.h @@ -3,15 +3,13 @@ #include #include "util/list-container.h" -using Inkscape::Util::ListContainer; - #define ARRAY_RANGE(array) (array), (array)+sizeof((array))/sizeof((array)[0]) -static bool check_values(ListContainer const &c, unsigned n_values, ...) { +static bool check_values(Inkscape::Util::ListContainer const &c, unsigned n_values, ...) { bool ret = true; va_list args; va_start(args, n_values); - ListContainer::const_iterator iter(c.begin()); + Inkscape::Util::ListContainer::const_iterator iter(c.begin()); while ( n_values && iter != c.end() ) { int const value = va_arg(args, int); if ( value != *iter ) { @@ -44,9 +42,9 @@ public: { int const values[]={1,2,3,4}; int const * const values_end=values+4; - ListContainer container(values, values_end); + Inkscape::Util::ListContainer container(values, values_end); - ListContainer::iterator container_iter=container.begin(); + Inkscape::Util::ListContainer::iterator container_iter=container.begin(); int const * values_iter=values; while ( values_iter != values_end && container_iter != container.end() ) { @@ -65,10 +63,10 @@ public: int const b[] = { 1, 2, 3, 4 }; int const c[] = { 1, 2, 3 }; int const d[] = { 1, 2, 3, 5 }; - ListContainer c_a(ARRAY_RANGE(a)); - ListContainer c_b(ARRAY_RANGE(b)); - ListContainer c_c(ARRAY_RANGE(c)); - ListContainer c_d(ARRAY_RANGE(d)); + Inkscape::Util::ListContainer c_a(ARRAY_RANGE(a)); + Inkscape::Util::ListContainer c_b(ARRAY_RANGE(b)); + Inkscape::Util::ListContainer c_c(ARRAY_RANGE(c)); + Inkscape::Util::ListContainer c_d(ARRAY_RANGE(d)); TS_ASSERT(c_a == c_b); TS_ASSERT(!( c_a != c_b )); @@ -84,10 +82,10 @@ public: int const b[] = { 1, 2, 2, 4 }; int const c[] = { 1, 2, 4, 4 }; int const d[] = { 1, 2, 3 }; - ListContainer c_a(ARRAY_RANGE(a)); - ListContainer c_b(ARRAY_RANGE(b)); - ListContainer c_c(ARRAY_RANGE(c)); - ListContainer c_d(ARRAY_RANGE(d)); + Inkscape::Util::ListContainer c_a(ARRAY_RANGE(a)); + Inkscape::Util::ListContainer c_b(ARRAY_RANGE(b)); + Inkscape::Util::ListContainer c_c(ARRAY_RANGE(c)); + Inkscape::Util::ListContainer c_d(ARRAY_RANGE(d)); TS_ASSERT(c_a >= c_b); TS_ASSERT(!( c_a < c_b )); TS_ASSERT(!( c_a >= c_c )); @@ -100,8 +98,8 @@ public: void testAssignmentOperator() { int const a[] = { 1, 2, 3, 4 }; - ListContainer c_a(ARRAY_RANGE(a)); - ListContainer c_c; + Inkscape::Util::ListContainer c_a(ARRAY_RANGE(a)); + Inkscape::Util::ListContainer c_c; TS_ASSERT(c_a != c_c); c_c = c_a; TS_ASSERT(c_a == c_c); @@ -111,26 +109,26 @@ public: void testFillConstructor() { - ListContainer filled((std::size_t)3, 2); + Inkscape::Util::ListContainer filled((std::size_t)3, 2); TS_ASSERT(check_values(filled, 3, 2, 2, 2)); } void testContainerSize() { - ListContainer empty; + Inkscape::Util::ListContainer empty; TS_ASSERT(empty.empty()); - TS_ASSERT_EQUALS(empty.size() , 0); + TS_ASSERT_EQUALS(static_cast(empty.size()), 0); int const a[] = { 1, 2, 3 }; - ListContainer c_a(ARRAY_RANGE(a)); + Inkscape::Util::ListContainer c_a(ARRAY_RANGE(a)); TS_ASSERT(!c_a.empty()); - TS_ASSERT_EQUALS(c_a.size() , 3); + TS_ASSERT_EQUALS(static_cast(c_a.size()), 3); - TS_ASSERT_LESS_THAN(0 , empty.max_size()); + TS_ASSERT_LESS_THAN(0, static_cast(empty.max_size())); } void testAppending() { - ListContainer c; + Inkscape::Util::ListContainer c; c.push_back(1); TS_ASSERT(check_values(c, 1, 1)); c.push_back(2); @@ -143,15 +141,15 @@ public: { int const a[] = { 1, 2, 3, 4 }; int const b[] = { 5, 6, 7 }; - ListContainer c_a(ARRAY_RANGE(a)); - ListContainer c_b(ARRAY_RANGE(b)); + Inkscape::Util::ListContainer c_a(ARRAY_RANGE(a)); + Inkscape::Util::ListContainer c_b(ARRAY_RANGE(b)); c_a.insert(c_a.end(), c_b.begin(), c_b.end()); TS_ASSERT(check_values(c_a, 7, 1, 2, 3, 4, 5, 6, 7)); } void testPrepending() { - ListContainer c; + Inkscape::Util::ListContainer c; c.push_front(1); TS_ASSERT(check_values(c, 1, 1)); c.push_front(2); @@ -162,7 +160,7 @@ public: void testSingleValueInsertion() { - ListContainer c; + Inkscape::Util::ListContainer c; c.insert(c.begin(), 1); TS_ASSERT(check_values(c, 1, 1)); @@ -173,7 +171,7 @@ public: c.insert(c.begin(), 3); TS_ASSERT(check_values(c, 3, 3, 1, 2)); - ListContainer::iterator pos=c.begin(); + Inkscape::Util::ListContainer::iterator pos=c.begin(); ++pos; c.insert(pos, 4); TS_ASSERT(check_values(c, 4, 3, 4, 1, 2)); @@ -182,12 +180,12 @@ public: void testSingleValueErasure() { int const values[] = { 1, 2, 3, 4 }; - ListContainer c(ARRAY_RANGE(values)); + Inkscape::Util::ListContainer c(ARRAY_RANGE(values)); c.erase(c.begin()); TS_ASSERT(check_values(c, 3, 2, 3, 4)); - ListContainer::iterator pos=c.begin(); + Inkscape::Util::ListContainer::iterator pos=c.begin(); ++pos; c.erase(pos); TS_ASSERT(check_values(c, 2, 2, 4)); @@ -204,7 +202,7 @@ public: void testPopFront() { int const full_ary[] = { 1, 2, 3 }; - ListContainer t(ARRAY_RANGE(full_ary)); + Inkscape::Util::ListContainer t(ARRAY_RANGE(full_ary)); TS_ASSERT(check_values(t, 3, 1, 2, 3)); TS_ASSERT_EQUALS(t.back() , 3); t.pop_front(); @@ -230,8 +228,8 @@ public: { int const full_ary[] = { 1, 2, 3, 4 }; int const exp_ary[] = { 1, 3, 4 }; - ListContainer full_list(ARRAY_RANGE(full_ary)); - ListContainer exp_list(ARRAY_RANGE(exp_ary)); + Inkscape::Util::ListContainer full_list(ARRAY_RANGE(full_ary)); + Inkscape::Util::ListContainer exp_list(ARRAY_RANGE(exp_ary)); TS_ASSERT(full_list != exp_list); full_list.erase_after(full_list.begin()); TS_ASSERT(full_list == exp_list); diff --git a/src/verbs-test.h b/src/verbs-test.h index 4fe6ea888..145b3859f 100644 --- a/src/verbs-test.h +++ b/src/verbs-test.h @@ -44,7 +44,7 @@ public: TSM_ASSERT( descr, verb ); if ( verb ) { - TSM_ASSERT_EQUALS( descr, verb->get_code(), i ); + TSM_ASSERT_EQUALS( descr, verb->get_code(), static_cast(i) ); if ( i != static_cast(SP_VERB_INVALID) ) { @@ -56,7 +56,7 @@ public: //TSM_ASSERT( descr, bounced ); if ( bounced ) { - TSM_ASSERT_EQUALS( descr, bounced->get_code(), i ); + TSM_ASSERT_EQUALS( descr, bounced->get_code(), static_cast(i) ); } else {