From 310bec6dce66edbad2608dc5f17bd2694738a504 Mon Sep 17 00:00:00 2001 From: jmjatlanta Date: Mon, 7 Jan 2019 11:13:48 -0500 Subject: [PATCH 1/3] Fix warning adding int to string literal --- src/io/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/json.cpp b/src/io/json.cpp index b9afc75..666af76 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -631,7 +631,7 @@ namespace fc to_stream(os, v.get_object(), format, max_depth - 1 ); return; default: - FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + v.get_type() ); + FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + std::to_string(v.get_type()) ); } } From f7e5f7396b68a48ecafc44977aa4930f595433be Mon Sep 17 00:00:00 2001 From: jmjatlanta Date: Mon, 7 Jan 2019 11:18:14 -0500 Subject: [PATCH 2/3] unneccesary capture --- tests/thread/parallel_tests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/thread/parallel_tests.cpp b/tests/thread/parallel_tests.cpp index 7da4c7b..5110e53 100644 --- a/tests/thread/parallel_tests.cpp +++ b/tests/thread/parallel_tests.cpp @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE( do_something_parallel ) results.reserve( 20 ); boost::thread_specific_ptr tls; for( size_t i = 0; i < results.capacity(); i++ ) - results.push_back( fc::do_parallel( [i,&tls] () { + results.push_back( fc::do_parallel( [&tls] () { if( !tls.get() ) { tls.reset( new int(0) ); } result res = { boost::this_thread::get_id(), (*tls.get())++ }; return res; From 9ba95190c4299ec69655406c048fd8795787adfa Mon Sep 17 00:00:00 2001 From: John Jones Date: Tue, 15 Jan 2019 12:19:00 -0500 Subject: [PATCH 3/3] make assert message more standard --- src/io/json.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io/json.cpp b/src/io/json.cpp index 666af76..712973c 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -631,7 +631,7 @@ namespace fc to_stream(os, v.get_object(), format, max_depth - 1 ); return; default: - FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: " + std::to_string(v.get_type()) ); + FC_THROW_EXCEPTION( fc::invalid_arg_exception, "Unsupported variant type: ${type}", ( "type", v.get_type() ) ); } }