From fbddb3163824d44cfb2ceee7127ac9ed2874acab Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Fri, 16 Oct 2009 21:05:22 +0000 Subject: removed usage of boost::true_type and boost::false_type made debug mouse events use standard / separator instead of -> reviewed by Leyla --- indra/llxuixml/llinitparam.h | 92 ++++++++++++++++++++++---------------------- indra/llxuixml/lluicolor.h | 1 - 2 files changed, 47 insertions(+), 46 deletions(-) (limited to 'indra/llxuixml') diff --git a/indra/llxuixml/llinitparam.h b/indra/llxuixml/llinitparam.h index b280dfdf63..4c936197c9 100644 --- a/indra/llxuixml/llinitparam.h +++ b/indra/llxuixml/llinitparam.h @@ -491,23 +491,25 @@ namespace LLInitParam // these templates allow us to distinguish between template parameters // that derive from BaseBlock and those that don't - // this is supposedly faster than boost::is_convertible and the ilk + // this is supposedly faster than boost::is_convertible and its ilk template struct is_BaseBlock - : boost::false_type - {}; + { + static const bool value = false; + }; template struct is_BaseBlock - : boost::true_type - {}; + { + static const bool value = true; + }; // specialize for custom parsing/decomposition of specific classes // e.g. TypedParam has left, top, right, bottom, etc... template, bool HAS_MULTIPLE_VALUES = false, - typename VALUE_IS_BLOCK = typename is_BaseBlock::type> + bool VALUE_IS_BLOCK = is_BaseBlock::value> class TypedParam : public Param { @@ -667,17 +669,17 @@ namespace LLInitParam // parameter that is a block template - class TypedParam + class TypedParam : public T, public Param { public: - typedef const T value_const_t; - typedef T value_t; - typedef value_const_t& value_const_ref_t; - typedef value_const_ref_t value_assignment_t; - typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; - typedef TypedParam self_t; + typedef const T value_const_t; + typedef T value_t; + typedef value_const_t& value_const_ref_t; + typedef value_const_ref_t value_assignment_t; + typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; + typedef TypedParam self_t; TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr), @@ -853,19 +855,19 @@ namespace LLInitParam // container of non-block parameters template - class TypedParam + class TypedParam : public Param { public: - typedef TypedParam self_t; - typedef typename std::vector container_t; - typedef const container_t& value_assignment_t; + typedef TypedParam self_t; + typedef typename std::vector container_t; + typedef const container_t& value_assignment_t; - typedef VALUE_TYPE value_t; - typedef value_t& value_ref_t; - typedef const value_t& value_const_ref_t; + typedef VALUE_TYPE value_t; + typedef value_t& value_ref_t; + typedef const value_t& value_const_ref_t; - typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; + typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr), @@ -1004,9 +1006,9 @@ namespace LLInitParam // explicit conversion value_assignment_t operator()() const { return get(); } - bool hasNValidElements(S32 n) const + U32 numValidElements() const { - return mValues.size() >= n; + return mValues.size(); } protected: @@ -1035,19 +1037,19 @@ namespace LLInitParam // container of block parameters template - class TypedParam + class TypedParam : public Param { public: - typedef TypedParam self_t; - typedef typename std::vector container_t; - typedef const container_t& value_assignment_t; + typedef TypedParam self_t; + typedef typename std::vector container_t; + typedef const container_t& value_assignment_t; - typedef VALUE_TYPE value_t; - typedef value_t& value_ref_t; - typedef const value_t& value_const_ref_t; + typedef VALUE_TYPE value_t; + typedef value_t& value_ref_t; + typedef const value_t& value_const_ref_t; - typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; + typedef typename NAME_VALUE_LOOKUP::KeyCache key_cache_t; TypedParam(BlockDescriptor& block_descriptor, const char* name, value_assignment_t value, ParamDescriptor::validation_func_t validate_func, S32 min_count, S32 max_count) : Param(block_descriptor.mCurrentBlockPtr), @@ -1287,9 +1289,9 @@ namespace LLInitParam public: friend class Choice; - typedef Alternative self_t; - typedef TypedParam super_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef Alternative self_t; + typedef TypedParam::value> super_t; + typedef typename super_t::value_assignment_t value_assignment_t; explicit Alternative(const char* name, value_assignment_t val = DefaultInitializer::get()) : super_t(DERIVED_BLOCK::sBlockDescriptor, name, val, NULL, 0, 1), @@ -1432,8 +1434,8 @@ namespace LLInitParam class Optional : public TypedParam { public: - typedef TypedParam super_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef TypedParam::value> super_t; + typedef typename super_t::value_assignment_t value_assignment_t; explicit Optional(const char* name = "", value_assignment_t val = DefaultInitializer::get()) : super_t(DERIVED_BLOCK::sBlockDescriptor, name, val, NULL, 0, 1) @@ -1459,9 +1461,9 @@ namespace LLInitParam class Mandatory : public TypedParam { public: - typedef TypedParam super_t; - typedef Mandatory self_t; - typedef typename super_t::value_assignment_t value_assignment_t; + typedef TypedParam::value> super_t; + typedef Mandatory self_t; + typedef typename super_t::value_assignment_t value_assignment_t; // mandatory parameters require a name to be parseable explicit Mandatory(const char* name = "", value_assignment_t val = DefaultInitializer::get()) @@ -1493,12 +1495,12 @@ namespace LLInitParam class Multiple : public TypedParam { public: - typedef TypedParam super_t; - typedef Multiple self_t; - typedef typename super_t::container_t container_t; - typedef typename super_t::value_assignment_t value_assignment_t; - typedef typename container_t::iterator iterator; - typedef typename container_t::const_iterator const_iterator; + typedef TypedParam::value> super_t; + typedef Multiple self_t; + typedef typename super_t::container_t container_t; + typedef typename super_t::value_assignment_t value_assignment_t; + typedef typename container_t::iterator iterator; + typedef typename container_t::const_iterator const_iterator; explicit Multiple(const char* name = "", value_assignment_t val = DefaultInitializer::get()) : super_t(DERIVED_BLOCK::sBlockDescriptor, name, val, &validate, RANGE::minCount(), RANGE::maxCount()) diff --git a/indra/llxuixml/lluicolor.h b/indra/llxuixml/lluicolor.h index fb9c6b9161..bb0f786326 100644 --- a/indra/llxuixml/lluicolor.h +++ b/indra/llxuixml/lluicolor.h @@ -11,7 +11,6 @@ #define LL_LLUICOLOR_H_ #include "v4color.h" -#include // for boost::false_type namespace LLInitParam { -- cgit v1.2.3