From 3971e6415c7e2c153943177e1494074faa1b187f Mon Sep 17 00:00:00 2001 From: David Williams Date: Mon, 22 Jul 2013 16:37:35 +0200 Subject: [PATCH] Added SWIG tests to stop build warning about operator<<. --- library/PolyVoxCore/include/PolyVoxCore/Region.h | 4 +++- library/PolyVoxCore/source/Region.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/Region.h b/library/PolyVoxCore/include/PolyVoxCore/Region.h index 4fe45a7e..74084c25 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Region.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Region.h @@ -204,7 +204,9 @@ namespace PolyVox // Non-member overloaded operators. /// Stream insertion operator. - std::ostream& operator<<(std::ostream& os, const Region& region); +#if !defined SWIG + std::ostream& operator<<(std::ostream& os, const Region& region); +#endif // Functions to be inlined to to be in the header rather than the .cpp. // 'inline' keyword is used for the definition rather than the declaration. diff --git a/library/PolyVoxCore/source/Region.cpp b/library/PolyVoxCore/source/Region.cpp index 2f61f63a..d86c55cb 100644 --- a/library/PolyVoxCore/source/Region.cpp +++ b/library/PolyVoxCore/source/Region.cpp @@ -494,10 +494,12 @@ namespace PolyVox * \param region The Region to write to the stream. * \return A reference to the output stream to allow chaining. */ +#if !defined SWIG std::ostream& operator<<(std::ostream& os, const Region& region) { os << "(" << region.getLowerX() << "," << region.getLowerY() << "," << region.getLowerZ() << ") to (" << region.getUpperX() << "," << region.getUpperY() << "," << region.getUpperZ() << ")"; return os; - } + } +#endif } \ No newline at end of file