Fixed compilation for Clang.

This commit is contained in:
Nyfor 2016-04-04 12:07:09 +02:00
parent d696f72533
commit 5e94c772b3
6 changed files with 19 additions and 40 deletions

View file

@ -225,20 +225,13 @@ private:
void handleLowLevelTransactionAckItem(RsGRouterTransactionAcknItem*) ;
static Sha1CheckSum computeDataItemHash(RsGRouterGenericDataItem *data_item);
#ifdef __APPLE__
public:
#endif
class nullstream: public std::ostream {};
std::ostream& grouter_debug() const
{
static nullstream null ;
static std::ostream null(0);
return _debug_enabled?(std::cerr):null;
}
#ifdef __APPLE__
private:
#endif
void routePendingObjects() ;
void handleTunnels() ;
void autoWash() ;
@ -364,5 +357,3 @@ private:
uint64_t _random_salt ;
};
template<typename T> p3GRouter::nullstream& operator<<(p3GRouter::nullstream& ns,const T&) { return ns ; }

View file

@ -366,11 +366,7 @@ int RsInit::InitRetroShare(int argcIgnored, char **argvIgnored, bool strictCheck
#ifdef LOCALNET_TESTING
>> parameter('R',"restrict-port" ,portRestrictions ,"port1-port2","Apply port restriction" ,false)
#endif
#ifdef __APPLE__
>> help('h',"help","Display this Help") ;
#else
>> help() ;
#endif
as.defaultErrorHandling(true) ;

View file

@ -140,16 +140,11 @@ namespace
protected:
inline OptionHolder(char s,
const char* l,
const char* desc);
#ifdef __APPLE__
const char* desc);
friend OptionHolder help(char s,
const char* l,
const char* desc);
#else
friend OptionHolder help(char s='h',
const char* l="help",
const char* desc="Display this help");
#endif
private:
std::string shortName_;
std::string longName_;