From 263a6bbdc55a524c118cc69bd7652ca09af5f886 Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Mon, 9 Jun 2014 09:54:11 -0400 Subject: [PATCH 1/2] add time_point_sec::minimum() and maximum() --- include/fc/time.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/fc/time.hpp b/include/fc/time.hpp index 595e7d7..7e3c426 100644 --- a/include/fc/time.hpp +++ b/include/fc/time.hpp @@ -83,6 +83,9 @@ namespace fc { time_point_sec( const time_point& t ) :utc_seconds( t.time_since_epoch().count() / 1000000ll ){} + static time_point_sec maximum() { return time_point_sec(0xffffffff); } + static time_point_sec min() { return time_point_sec(0); } + operator time_point()const { return time_point( fc::seconds( utc_seconds) ); } uint32_t sec_since_epoch()const { return utc_seconds; } From 8e82a0a24a8bb08e59d95126e8435c663a8f5a2b Mon Sep 17 00:00:00 2001 From: Eric Frias Date: Mon, 9 Jun 2014 09:55:02 -0400 Subject: [PATCH 2/2] Fix default constructor for exceptions declared using the FC_DECLARE_EXCEPTION macro to include the correct code and strings --- include/fc/exception/exception.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fc/exception/exception.hpp b/include/fc/exception/exception.hpp index c83b9d0..60db915 100644 --- a/include/fc/exception/exception.hpp +++ b/include/fc/exception/exception.hpp @@ -225,7 +225,7 @@ namespace fc :exception(c){} \ TYPE( const exception& c ) \ :exception(c){} \ - TYPE():exception(){}\ + TYPE():exception(CODE, BOOST_PP_STRINGIZE(TYPE), WHAT){}\ \ virtual std::shared_ptr dynamic_copy_exception()const\ { return std::make_shared( *this ); } \