Fix constexprs, unused code

This commit is contained in:
Nathan Hourt 2019-08-29 13:49:49 -05:00
parent c69ea32613
commit 94cb1858b8
3 changed files with 2 additions and 14 deletions

View file

@ -375,11 +375,3 @@ namespace fc { \
template<> struct get_typename<TYPE> { static const char* name() { return BOOST_PP_STRINGIZE(TYPE); } }; \ template<> struct get_typename<TYPE> { static const char* name() { return BOOST_PP_STRINGIZE(TYPE); } }; \
} }
// vvv These are preserved to merge more smoothly vvv
#define FC_REFLECT_BASE_MEMBER_COUNT( r, OP, elem ) \
OP fc::reflector<elem>::total_member_count
#define FC_REFLECT_MEMBER_COUNT( r, OP, elem ) \
OP 1
// ^^^ These can be removed after updating graphene/protocol/types.hpp ^^^

View file

@ -118,7 +118,7 @@ public:
template<typename X, typename = type_in_typelist<X>> template<typename X, typename = type_in_typelist<X>>
struct tag struct tag
{ {
static const int value = typelist::index_of<list, X>(); static constexpr int value = typelist::index_of<list, X>();
}; };
struct type_lt { struct type_lt {
@ -293,7 +293,7 @@ public:
}); });
} }
static int count() { return typelist::length<list>(); } static constexpr int count() { return typelist::length<list>(); }
void set_which( tag_type w ) { void set_which( tag_type w ) {
FC_ASSERT( w >= 0 ); FC_ASSERT( w >= 0 );
FC_ASSERT( w < count() ); FC_ASSERT( w < count() );

View file

@ -300,10 +300,6 @@ namespace fc { namespace http {
_server.close( item.first, 0, "server exit" ); _server.close( item.first, 0, "server exit" );
if( _closed ) _closed->wait(); if( _closed ) _closed->wait();
#ifdef TRAVIS_BUILD
#warning Adding 100ms sleep to ~websocket_server_impl() to stabilize Travis tests
fc::usleep(fc::milliseconds(100));
#endif
} }
typedef std::map<connection_hdl, websocket_connection_ptr,std::owner_less<connection_hdl> > con_map; typedef std::map<connection_hdl, websocket_connection_ptr,std::owner_less<connection_hdl> > con_map;