From 0f1cf6e40542e0992f6988e67b75b2f74ba4142b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 10 Dec 2014 12:20:33 -0500 Subject: Clarify for VS 2013 that an operator bool() method returns bool. For some reason VS 2013 (unlike its predecessors and other current compilers) needs us to explicitly convert an operator bool() method's return expression to bool. :-P --- indra/llcommon/lleventcoro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index f55b74ac7e..abbeeaa373 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -67,7 +67,7 @@ public: LLEventPumpOrPumpName() {} operator LLEventPump& () const { return *mPump; } LLEventPump& getPump() const { return *mPump; } - operator bool() const { return mPump; } + operator bool() const { return bool(mPump); } bool operator!() const { return ! mPump; } private: -- cgit v1.2.3 From d74d8ff7c5ed4a145f8ab440c9e21f46ff35f2a0 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 10 Dec 2014 11:15:56 -0800 Subject: Replace boost::lambda::_1 with boost::phoenix::placeholders::arg1. Apparently in Boost 1.57 with Xcode 6, the combination of Boost.Lambda and Boost.Function is broken -- Trac ticket 10864: https://svn.boost.org/trac/boost/ticket/10864 However, Boost.Phoenix provides an acceptable replacement. --- indra/test/namedtempfile.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra') diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h index 6069064627..7d59cad32c 100755 --- a/indra/test/namedtempfile.h +++ b/indra/test/namedtempfile.h @@ -17,8 +17,8 @@ #include "apr_file_io.h" #include #include -#include -#include +#include +#include #include #include #include @@ -34,19 +34,19 @@ public: NamedTempFile(const std::string& pfx, const std::string& content, apr_pool_t* pool=gAPRPoolp): mPool(pool) { - createFile(pfx, boost::lambda::_1 << content); + createFile(pfx, boost::phoenix::placeholders::arg1 << content); } // Disambiguate when passing string literal NamedTempFile(const std::string& pfx, const char* content, apr_pool_t* pool=gAPRPoolp): mPool(pool) { - createFile(pfx, boost::lambda::_1 << content); + createFile(pfx, boost::phoenix::placeholders::arg1 << content); } // Function that accepts an ostream ref and (presumably) writes stuff to // it, e.g.: - // (boost::lambda::_1 << "the value is " << 17 << '\n') + // (boost::phoenix::placeholders::arg1 << "the value is " << 17 << '\n') typedef boost::function Streamer; NamedTempFile(const std::string& pfx, const Streamer& func, apr_pool_t* pool=gAPRPoolp): -- cgit v1.2.3