Skip to content
This repository was archived by the owner on Dec 29, 2018. It is now read-only.

Merge various fixes from BitShares #17

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
8910680
add parameterized constructor
jmjatlanta May 28, 2018
0fc569c
Remove unused "smaz" compression
pmconrad May 29, 2018
cff8e96
Merge pull request #51 from pmconrad/core_986_cleanup
pmconrad May 29, 2018
36359f5
Merge pull request #50 from bitshares/jmj_issue_762
jmjatlanta May 29, 2018
64aa565
Remove fc bz2 unused linkage
oxarbitrage May 31, 2018
0a90eff
Merge pull request #7 from bitshares/openssl-1.1-support
oxarbitrage May 31, 2018
59f503d
adjust asserts in fc/crypto
jmjatlanta Jun 2, 2018
ea18aca
Merge pull request #52 from bitshares/bz2-unused-linkage
oxarbitrage Jun 4, 2018
0dbf7ff
Merge pull request #49 from bitshares/travis_sonar
pmconrad Jun 5, 2018
d8437ac
Merge pull request #54 from bitshares/jmj_issue_992
jmjatlanta Jun 7, 2018
ac982ca
fix compile error with vs2017 and boost 1.67
Jun 30, 2018
e609d70
Remove unnecessary structure definition in static_variant.hpp
RichardWeiYang Jul 5, 2018
6d3184f
Fix two typo in variant.hpp
RichardWeiYang Jul 5, 2018
650c0a3
fix hardcode of OPENSSL_CONF_SOURCE in CMakeLists.txt
Jul 5, 2018
20724f7
fixed issue #809
nanomobile Jul 9, 2018
ce2e62f
fix editline sigsev
jmjatlanta Jul 16, 2018
4dc3732
Merge pull request #59 from cwyyprog/cwyy1
pmconrad Jul 17, 2018
996dc14
Merge pull request #58 from RichardWeiYang/master
pmconrad Jul 17, 2018
d679377
Merge pull request #60 from bitshares/jmj_issue_1127
pmconrad Jul 17, 2018
1169c2d
removed using statement from header file
nanomobile Jul 17, 2018
da5f2c3
fixed issue #929
nanomobile Jul 17, 2018
ee25279
added idump for websocket_tls_server_impl
nanomobile Jul 17, 2018
0486a5f
fixed issue #1050
nanomobile Jul 18, 2018
535fc86
remove hard coded method check to result check from quit command
nanomobile Jul 19, 2018
1820655
throwing fc:canceled_exception for quit cli wallet command
nanomobile Jul 20, 2018
ed168a4
Merge pull request #62 from cogutvalera/valera_issue_929
abitmore Jul 23, 2018
82987bb
Bump for websocketpp, bitshares-core issue 999
jmjatlanta Jul 23, 2018
0604a5e
Merge pull request #65 from bitshares/jmj_issue_999
abitmore Jul 23, 2018
2105bc0
Add header
jmjatlanta Jul 24, 2018
f1e48d3
Merge pull request #56 from nanomobile/valera_issue_809
abitmore Jul 25, 2018
7080cf4
Merge pull request #66 from bitshares/jmj_stacktrace
jmjatlanta Jul 25, 2018
5469bb9
Merge pull request #63 from cogutvalera/valera_issue_1050
pmconrad Jul 25, 2018
9e043fb
fc::time_point_sec::to_iso_string is broken - issue #597
nanomobile Jul 27, 2018
0077926
removed comment
nanomobile Jul 27, 2018
e310159
Merge pull request #67 from cogutvalera/valera_issue_597
jmjatlanta Jul 27, 2018
40d928e
raise SIGINT instead of throwing exception in cli_wallet quit command
cogutvalera Jul 30, 2018
8174558
Merge pull request #68 from cogutvalera/valera_issue_1193
abitmore Jul 30, 2018
ec41a06
reverting throw exception instead of raising SIGINT in order not to t…
cogutvalera Jul 30, 2018
1a457ca
Merge pull request #70 from cogutvalera/valera_issue_1193
abitmore Jul 30, 2018
1eca495
fix import_key crash for wallet
zuuluuz May 24, 2018
ce7cb0d
Check error after called boost::filesystem::copy()
Aug 9, 2018
35cb63d
Call FC wrappers of copy and remove in rename()
abitmore Aug 9, 2018
64b4bd4
Wrap system_error::what() in a string
abitmore Aug 9, 2018
48901cd
correct templating of static variant
jmjatlanta Aug 10, 2018
da33edc
additional typenames
jmjatlanta Aug 10, 2018
e896188
additional templates for get_typename
jmjatlanta Aug 11, 2018
9ba8886
Change string to static
jmjatlanta Aug 13, 2018
46ba4cc
Merge pull request #74 from bitshares/jmj_issue_1271
jmjatlanta Aug 13, 2018
7ac533b
Merge pull request #73 from bitshares/fix-file-copy
jmjatlanta Aug 17, 2018
f8940a6
Added unit test for serialization/deserialization of unsigned_int
pmconrad Jul 18, 2018
9483935
Support 64 bit values in unsigned_int object
pmconrad Jul 18, 2018
58ac6ae
Changed some casts to uint64_t
pmconrad Aug 18, 2018
72bcc8a
Fix #993 - limit unpacking length of signed_int and unsigned_int
pmconrad Aug 18, 2018
a39e0d1
Expanded tests for unsigned_int to 64 bits
pmconrad Aug 18, 2018
0c22469
#993 - unit test
pmconrad Aug 19, 2018
4b61f3c
Fixed alleged c&p bug
pmconrad Aug 19, 2018
1dcacba
Removed signed_int
pmconrad Aug 19, 2018
79ff754
Throw overflow_exception instead of silently cutting off data
pmconrad Aug 19, 2018
fcfa7b6
Relabelling to SounDAC
pmconrad Aug 20, 2018
814bb4e
Use newer ccache, add some ccache settings to environment
pmconrad Aug 20, 2018
1a27ef3
Merge pull request #1 from soundac/relabel
pmconrad Aug 20, 2018
02a4516
Handle b<0
pmconrad Aug 21, 2018
2405081
Merge pull request #64 from bitshares/1088_unsigned_int
pmconrad Aug 22, 2018
1f907fe
Merge remote-tracking branch 'bts/master'
pmconrad Aug 22, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: c++

cache: ccache

git:
depth: 1

Expand All @@ -10,19 +12,25 @@ sudo: true
install:
- echo "deb http://de.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- sudo apt-get install --allow-unauthenticated g++ libboost-all-dev cmake libreadline-dev libssl-dev autoconf parallel
- sudo apt-get install --allow-unauthenticated g++ libboost-all-dev cmake libreadline-dev libssl-dev autoconf parallel ccache

addons:
sonarcloud:
organization: "djxeo0smpujky4mpro50l67fsv74ijvt"
organization: "soundac"
token:
secure: "aJ1aXr7JCsd7EwN0GQDJibKK24SW27AYrc5RDS7+MIJ5CCSX8e/cZ8v0Se6JmaXqt4t/VKAuVtv9JW2HZMMv2c2ACDpGWysKftS0Nb3JJCDHth+NZKGWhl9rFGQ90BigL3qQu2c9haJ77uCXko2BudcSqd9ejfSpQLA0tLrT7QGr/iS+pdmEQOVAsNWF4157hYSSxwz1WIHX2uxci2y9zCiE0ckmkpxwmI6qFiIExC6Y7LAATBeE1fT4KocPYZSAbeYx6D0C1llaWnw0ICf1jVF9ZEG79GDlnM9Uqj9rAAWIhgJFie15gYFvsfsv/W1R7u4xh0204/86HEfHCaV5JLUKGuxWRvtHhMmOC4LRf4siscT52R28AUq+QIak4dgL1H4QL6AvhpCK4SeeZj644XA8VJUp7skjpk2cNJ6RZA4TdOY/qSAGSSf/wHizftRdjb7oPn0nHgadr3biDI2LrhGI4N4lAZdxrBjUODkzENsgR4vQ4RtFw62gpxvUpqMwFkNIEYxWo9bVNXmqYzBKJqqL/lHsm7QZHJgpOcn/jFow+R9n73LjKGGDbJcCZ7TUbWWFzhaGiw7aDyYFuZgGVkEuT81KQdxaLjG6X5hMrLGaB8No9T8Vj+4121rcCxX3r8MK0uvVzcaKt9Md51zCJ6GoF4FcQbI8TkOj2O7i4ZM="
secure: "Cr3q74yHUsS+kcAsAtB+yB2AyDptL8Rpmw+Q8HR+1MIEnIqyp5BLGNzOZnlucNQwUSUeVF81MpVTRgJT7zzVRa3XbVIngT25a3mm7zgULtG+RJG2rIFoeFWmgmj8kf+1HAis2lsJNUDylhrdumRQS3fMXBA/5Hz4Sbrve/TUg40RutAOsaXipwxqsanxnt/vwFndbb8Y/wprmgHrj45IMG+5bdJ6+DjaahJ9c1QDtWhtn9kPVYCJlO+XRzbHoVCOJOw8+r3FW8I5bDKMxbwGnAcAt4h0ZaxWtUSvt/iECpZqmOgirmVKQ9FJFzcCWBw+PY5Z+bnjwLjDCm2HqoNDk08cWLTn4Na/ZFO5AbBjS9L2VYC5PLpboTJnAygKcEcFDxsNDpnJK5mbcyV/Yzcmwwu5bIEfaDJS4aE1hVCqKhWP7Ecg2QxLtDSG4NHmyrG0CCUorhSemgUK5XvZ9QsSMqnBYl5ee9y/mc6swjHTK3DshJOHzWHO0QpoHg+fv5At7CXWvF/0F7/l24RvCweSni6/eT40MsM6tQCAEJRe6RFBeZAXs1RW+uh+A/CVeTKjNOtJNsV8AmJyu3bR3C7Kug3t+jbZ7cqms+wxyeIt01nYkgJM84kAnnJI51x+c3YtdJ4zK7dic7XWfy0jWdGVb9/JydPmhxI2PEKpPqnFmyk="

env:
global:
- CCACHE_COMPRESS=exists_means_true
- CCACHE_MAXSIZE=1Gi
- CCACHE_SLOPPINESS=include_file_ctime,include_file_mtime,time_macros

script:
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=--coverage -DCMAKE_CXX_FLAGS=--coverage -DBoost_USE_STATIC_LIBS=OFF -DCMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON .
- 'which build-wrapper-linux-x86-64 && build-wrapper-linux-x86-64 --out-dir bw-output make -j 2 || make -j 2'
- set -o pipefail
- tests/run-parallel-tests.sh tests/all_tests
- tests/all_tests 2>&1 | cat
- tests/api 2>&1 | cat
- tests/ecc_test README.md 2>&1 | cat
- tests/log_test 2>&1 | cat
Expand Down
23 changes: 7 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ set( fc_sources
src/network/rate_limiting.cpp
src/network/resolve.cpp
src/network/url.cpp
src/compress/smaz.cpp
src/compress/zlib.cpp
)

Expand Down Expand Up @@ -367,15 +366,6 @@ else()
set( ZLIB_LIBRARIES "" )
endif( ZLIB_FOUND )

find_package( BZip2 )
if( BZIP2_FOUND )
MESSAGE( STATUS "bzip2 found" )
add_definitions( -DHAS_BZIP2 )
else()
MESSAGE( STATUS "bzip2 not found" )
set( BZIP2_LIBRARIES "" )
endif( BZIP2_FOUND )

# This will become unnecessary once we update to websocketpp which fixes upstream issue #395
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWEBSOCKETPP_STRICT_MASKING")

Expand Down Expand Up @@ -406,11 +396,10 @@ target_include_directories(fc
${CMAKE_CURRENT_SOURCE_DIR}/vendor/secp256k1-zkp
)

#target_link_libraries( fc PUBLIC ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library} ${ECC_LIB} )
IF(NOT WIN32)
set(LINK_USR_LOCAL_LIB -L/usr/local/lib)
ENDIF()
target_link_libraries( fc PUBLIC ${LINK_USR_LOCAL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library} ${editline_libraries} ${ECC_LIB} )
target_link_libraries( fc PUBLIC ${LINK_USR_LOCAL_LIB} ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES} ${PLATFORM_SPECIFIC_LIBS} ${RPCRT4} ${CMAKE_DL_LIBS} ${rt_library} ${editline_libraries} ${ECC_LIB} )

if(MSVC)
set_source_files_properties( src/network/http/websocket.cpp PROPERTIES COMPILE_FLAGS "/bigobj" )
Expand Down Expand Up @@ -522,10 +511,12 @@ ENDIF()
IF("${OPENSSL_ROOT_DIR}" STREQUAL "")
get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_INCLUDE_DIR}/.." REALPATH)
ENDIF()
SET(OPENSSL_CONF_SOURCE "${OPENSSL_ROOT_DIR}/ssl/openssl.cnf")
IF(MINGW)
SET(OPENSSL_CONF_SOURCE "${OPENSSL_ROOT_DIR}/openssl.cnf")
ENDIF(MINGW)
IF("${OPENSSL_CONF_SOURCE}" STREQUAL "")
SET(OPENSSL_CONF_SOURCE "${OPENSSL_ROOT_DIR}/ssl/openssl.cnf")
IF(MINGW)
SET(OPENSSL_CONF_SOURCE "${OPENSSL_ROOT_DIR}/openssl.cnf")
ENDIF(MINGW)
ENDIF()
SET(POST_BUILD_STEP_COMMANDS ${POST_BUILD_STEP_COMMANDS}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${OPENSSL_CONF_SOURCE}" "${OPENSSL_CONF_TARGET}/openssl.cnf")
ENDIF(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fc
==

[![](https://travis-ci.org/themuseblockchain/Muse-FC.svg?branch=master)](https://travis-ci.org/themuseblockchain/Muse-FC)
[![](https://travis-ci.org/soundac/SounDAC-FC.svg?branch=master)](https://travis-ci.org/soundac/SounDAC-FC)

FC stands for fast-compiling c++ library and provides a set of utility libraries useful
for the development of asynchronous libraries. Some of the highlights include:
Expand Down
14 changes: 14 additions & 0 deletions include/fc/bloom_filter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ class bloom_parameters
random_seed(0xA5A5A5A55A5A5A5AULL)
{}

bloom_parameters(unsigned long long int projected_element_count,
double false_positive_probability,
unsigned long long int maximum_size) :
minimum_size(1),
maximum_size(maximum_size),
minimum_number_of_hashes(1),
maximum_number_of_hashes(std::numeric_limits<unsigned int>::max()),
projected_element_count(projected_element_count),
false_positive_probability(false_positive_probability),
random_seed(0xA5A5A5A55A5A5A5AULL)
{
compute_optimal_parameters();
}

virtual ~bloom_parameters()
{}

Expand Down
9 changes: 0 additions & 9 deletions include/fc/compress/smaz.hpp

This file was deleted.

6 changes: 3 additions & 3 deletions include/fc/container/flat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace fc {
inline void pack( Stream& s, const flat_set<T>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand All @@ -38,7 +38,7 @@ namespace fc {
inline void pack( Stream& s, const flat_map<K,V...>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -67,7 +67,7 @@ namespace fc {
void pack( Stream& s, const bip::vector<T,A>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
pack( s, unsigned_int(value.size()), _max_depth );
if( !std::is_fundamental<T>::value ) {
auto itr = value.begin();
auto end = value.end();
Expand Down
2 changes: 1 addition & 1 deletion include/fc/interprocess/container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ namespace fc {
inline void pack( Stream& s, const bip::vector<T,A...>& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down
6 changes: 3 additions & 3 deletions include/fc/io/fstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#include <fc/shared_ptr.hpp>
#include <fc/filesystem.hpp>
#include <fc/io/iostream.hpp>
#include <fstream>

namespace fc {
class path;
class ofstream : virtual public ostream {
public:
enum mode { out, binary };
ofstream();
ofstream( const fc::path& file, int m = binary );
ofstream( const fc::path& file, std::ios_base::openmode m = std::ios_base::out | std::ios_base::binary );
~ofstream();

void open( const fc::path& file, int m = binary );
void open( const fc::path& file, std::ios_base::openmode m = std::ios_base::out | std::ios_base::binary );
size_t writesome( const char* buf, size_t len );
size_t writesome(const std::shared_ptr<const char>& buffer, size_t len, size_t offset);
void put( char c );
Expand Down
45 changes: 13 additions & 32 deletions include/fc/io/raw.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,6 @@ namespace fc {
fc::raw::unpack( s, *v, _max_depth - 1 );
} FC_RETHROW_EXCEPTIONS( warn, "std::shared_ptr<T>", ("type",fc::get_typename<T>::name()) ) }

template<typename Stream> inline void pack( Stream& s, const signed_int& v, uint32_t _max_depth ) {
uint32_t val = (v.value<<1) ^ (v.value>>31);
do {
uint8_t b = uint8_t(val) & 0x7f;
val >>= 7;
b |= ((val > 0) << 7);
s.write((char*)&b,1);//.put(b);
} while( val );
}

template<typename Stream> inline void pack( Stream& s, const unsigned_int& v, uint32_t _max_depth ) {
uint64_t val = v.value;
do {
Expand All @@ -178,25 +168,16 @@ namespace fc {
}while( val );
}

template<typename Stream> inline void unpack( Stream& s, signed_int& vi, uint32_t _max_depth ) {
uint32_t v = 0; char b = 0; int by = 0;
do {
s.get(b);
v |= uint32_t(uint8_t(b) & 0x7f) << by;
by += 7;
} while( uint8_t(b) & 0x80 );
vi.value = ((v>>1) ^ (v>>31)) + (v&0x01);
vi.value = v&0x01 ? vi.value : -vi.value;
vi.value = -vi.value;
}
template<typename Stream> inline void unpack( Stream& s, unsigned_int& vi, uint32_t _max_depth ) {
uint64_t v = 0; char b = 0; uint8_t by = 0;
do {
s.get(b);
v |= uint32_t(uint8_t(b) & 0x7f) << by;
if( by >= 64 || (by == 63 && uint8_t(b) > 1) )
FC_THROW_EXCEPTION( overflow_exception, "Invalid packed unsigned_int!" );
v |= uint64_t(uint8_t(b) & 0x7f) << by;
by += 7;
} while( uint8_t(b) & 0x80 );
vi.value = static_cast<uint32_t>(v);
vi.value = static_cast<uint64_t>(v);
}

template<typename Stream, typename T> inline void unpack( Stream& s, const T& vi, uint32_t _max_depth )
Expand Down Expand Up @@ -273,9 +254,9 @@ namespace fc {
// std::vector<char>
template<typename Stream> inline void pack( Stream& s, const std::vector<char>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth - 1 );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth - 1 );
if( value.size() )
s.write( &value.front(), (uint32_t)value.size() );
s.write( &value.front(), value.size() );
}
template<typename Stream> inline void unpack( Stream& s, std::vector<char>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
Expand All @@ -289,7 +270,7 @@ namespace fc {
// fc::string
template<typename Stream> inline void pack( Stream& s, const fc::string& v, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
fc::raw::pack( s, unsigned_int((uint32_t)v.size()), _max_depth - 1 );
fc::raw::pack( s, unsigned_int(v.size()), _max_depth - 1 );
if( v.size() ) s.write( v.c_str(), v.size() );
}

Expand Down Expand Up @@ -433,7 +414,7 @@ namespace fc {
inline void pack( Stream& s, const std::unordered_set<T>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -478,7 +459,7 @@ namespace fc {
inline void pack( Stream& s, const std::unordered_map<K,V>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -506,7 +487,7 @@ namespace fc {
inline void pack( Stream& s, const std::map<K,V>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -534,7 +515,7 @@ namespace fc {
inline void pack( Stream& s, const std::deque<T>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -562,7 +543,7 @@ namespace fc {
inline void pack( Stream& s, const std::vector<T>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down Expand Up @@ -590,7 +571,7 @@ namespace fc {
inline void pack( Stream& s, const std::set<T>& value, uint32_t _max_depth ) {
FC_ASSERT( _max_depth > 0 );
--_max_depth;
fc::raw::pack( s, unsigned_int((uint32_t)value.size()), _max_depth );
fc::raw::pack( s, unsigned_int(value.size()), _max_depth );
auto itr = value.begin();
auto end = value.end();
while( itr != end ) {
Expand Down
3 changes: 0 additions & 3 deletions include/fc/io/raw_fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ namespace fc {
template<typename Stream, typename T> inline void pack( Stream& s, const std::vector<T>& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
template<typename Stream, typename T> inline void unpack( Stream& s, std::vector<T>& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );

template<typename Stream> inline void pack( Stream& s, const signed_int& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
template<typename Stream> inline void unpack( Stream& s, signed_int& vi, uint32_t _max_depth=FC_PACK_MAX_DEPTH );

template<typename Stream> inline void pack( Stream& s, const unsigned_int& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH );
template<typename Stream> inline void unpack( Stream& s, unsigned_int& vi, uint32_t _max_depth=FC_PACK_MAX_DEPTH );

Expand Down
2 changes: 1 addition & 1 deletion include/fc/io/raw_variant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace fc { namespace raw {
{
FC_ASSERT( _max_depth > 0 );
--_max_depth;
unsigned_int vs = (uint32_t)v.size();
unsigned_int vs = v.size();
pack( s, vs, _max_depth );
for( auto itr = v.begin(); itr != v.end(); ++itr )
{
Expand Down
Loading