Merge pull request #21 from mutouyun/develop

warning C4267
This commit is contained in:
木头云 2020-09-26 19:35:59 +08:00 committed by GitHub
commit 1202272077
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -13,7 +13,10 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
add_subdirectory(src)
set(GOOGLETEST_VERSION 1.10.0)
add_subdirectory(3rdparty/gtest)
add_subdirectory(test)
add_subdirectory(demo/chat)
add_subdirectory(demo/msg_que)

View File

@ -27,7 +27,10 @@ using msg_que_t = ipc::chan<ipc::relat::single, ipc::relat::single, ipc::trans::
msg_que_t que__{ name__ };
ipc::byte_t buff__[max_sz];
capo::random<> rand__{ min_sz, max_sz };
capo::random<> rand__{
static_cast<int>(min_sz),
static_cast<int>(max_sz)
};
inline std::string str_of_size(std::size_t sz) noexcept {
if (sz > 1024 * 1024) {