Added SWIG tests to stop build warning about operator<<.

This commit is contained in:
David Williams 2013-07-22 16:37:35 +02:00
parent 63dfaa5a13
commit 3971e6415c
2 changed files with 6 additions and 2 deletions

View File

@ -204,7 +204,9 @@ namespace PolyVox
// Non-member overloaded operators. // Non-member overloaded operators.
/// Stream insertion operator. /// Stream insertion operator.
#if !defined SWIG
std::ostream& operator<<(std::ostream& os, const Region& region); std::ostream& operator<<(std::ostream& os, const Region& region);
#endif
// Functions to be inlined to to be in the header rather than the .cpp. // 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. // 'inline' keyword is used for the definition rather than the declaration.

View File

@ -494,10 +494,12 @@ namespace PolyVox
* \param region The Region to write to the stream. * \param region The Region to write to the stream.
* \return A reference to the output stream to allow chaining. * \return A reference to the output stream to allow chaining.
*/ */
#if !defined SWIG
std::ostream& operator<<(std::ostream& os, const Region& region) std::ostream& operator<<(std::ostream& os, const Region& region)
{ {
os << "(" << region.getLowerX() << "," << region.getLowerY() << "," << region.getLowerZ() << os << "(" << region.getLowerX() << "," << region.getLowerY() << "," << region.getLowerZ() <<
") to (" << region.getUpperX() << "," << region.getUpperY() << "," << region.getUpperZ() << ")"; ") to (" << region.getUpperX() << "," << region.getUpperY() << "," << region.getUpperZ() << ")";
return os; return os;
} }
#endif
} }