X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fcsg.cpp;h=2538359fc96a8ac5d8e9b7285c22058368d940db;hb=2d8381a1be1e00bfcc0bad5b53371875f8dd4956;hp=5676401eb982d0ce37bbdbde391c8ab67c71f551;hpb=dac8329952745dbb494bad1c301e44bab05ec0db;p=xonotic%2Fnetradiant.git diff --git a/radiant/csg.cpp b/radiant/csg.cpp index 5676401e..2538359f 100644 --- a/radiant/csg.cpp +++ b/radiant/csg.cpp @@ -166,11 +166,9 @@ class Dereference { const Functor& functor; public: -typedef typename RemoveReference::type* first_argument_type; -typedef typename Functor::result_type result_type; Dereference( const Functor& functor ) : functor( functor ){ } -result_type operator()( first_argument_type firstArgument ) const { +get_result_type operator()( typename RemoveReference>::type *firstArgument ) const { return functor( *firstArgument ); } }; @@ -192,15 +190,13 @@ Face* Brush_findIf( const Brush& brush, const Predicate& predicate ){ template class BindArguments1 { -typedef typename Caller::second_argument_type FirstBound; +typedef get_argument FirstBound; FirstBound firstBound; public: -typedef typename Caller::result_type result_type; -typedef typename Caller::first_argument_type first_argument_type; BindArguments1( FirstBound firstBound ) : firstBound( firstBound ){ } -result_type operator()( first_argument_type firstArgument ) const { +get_result_type operator()( get_argument firstArgument ) const { return Caller::call( firstArgument, firstBound ); } }; @@ -208,17 +204,15 @@ result_type operator()( first_argument_type firstArgument ) const { template class BindArguments2 { -typedef typename Caller::second_argument_type FirstBound; -typedef typename Caller::third_argument_type SecondBound; +typedef get_argument FirstBound; +typedef get_argument SecondBound; FirstBound firstBound; SecondBound secondBound; public: -typedef typename Caller::result_type result_type; -typedef typename Caller::first_argument_type first_argument_type; BindArguments2( FirstBound firstBound, SecondBound secondBound ) : firstBound( firstBound ), secondBound( secondBound ){ } -result_type operator()( first_argument_type firstArgument ) const { +get_result_type operator()( get_argument firstArgument ) const { return Caller::call( firstArgument, firstBound, secondBound ); } };