From d6baa7a8533a65174f96051c67f7d8b5b160394f Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 6 Dec 2019 16:02:28 -0500 Subject: DRTVWR-494: Put streaming operator<<() for kdu_dims in kdu_core. It seems the lookup now requires that the operator<<() function be defined in the same namespace as the argument. --- indra/llkdu/llimagej2ckdu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/llkdu/llimagej2ckdu.cpp b/indra/llkdu/llimagej2ckdu.cpp index 4048b9a43d..dac5349f57 100644 --- a/indra/llkdu/llimagej2ckdu.cpp +++ b/indra/llkdu/llimagej2ckdu.cpp @@ -44,16 +44,19 @@ using namespace kdu_core; #include #include -// stream kdu_dims to std::ostream // Turns out this must NOT be in the anonymous namespace! -// It must also precede #include "stringize.h". +namespace kdu_core +{ +// stream kdu_dims to std::ostream inline std::ostream& operator<<(std::ostream& out, const kdu_dims& dims) { return out << "(" << dims.pos.x << "," << dims.pos.y << ")," "[" << dims.size.x << "x" << dims.size.y << "]"; } +} // namespace kdu_core +// operator<<(std::ostream&, const kdu_dims&) must precede #include "stringize.h" #include "stringize.h" namespace { -- cgit v1.2.3