From c0e0fc0c91dabdb86f68eed78e4a8f2b94fd1c2d Mon Sep 17 00:00:00 2001 From: tqchen Date: Sat, 25 Apr 2015 21:19:58 -0700 Subject: [PATCH] Squashed 'subtree/rabit/' changes from 82ca10a..27340f9 27340f9 final minor e03eabc allow win32 git-subtree-dir: subtree/rabit git-subtree-split: 27340f95e43ef6f756f4882844d8c42a10d3b78e --- include/dmlc/io.h | 4 ++-- windows/rabit/rabit.vcxproj | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/dmlc/io.h b/include/dmlc/io.h index 1b7d70498..8caf2a1f7 100644 --- a/include/dmlc/io.h +++ b/include/dmlc/io.h @@ -303,7 +303,7 @@ inline void Stream::Write(const std::vector &vec) { uint64_t sz = static_cast(vec.size()); this->Write(&sz, sizeof(sz)); if (sz != 0) { - this->Write(&vec[0], sizeof(T) * sz); + this->Write(&vec[0], sizeof(T) * vec.size()); } } template @@ -320,7 +320,7 @@ inline void Stream::Write(const std::string &str) { uint64_t sz = static_cast(str.length()); this->Write(&sz, sizeof(sz)); if (sz != 0) { - this->Write(&str[0], sizeof(char) * sz); + this->Write(&str[0], sizeof(char) * str.length()); } } inline bool Stream::Read(std::string *out_str) { diff --git a/windows/rabit/rabit.vcxproj b/windows/rabit/rabit.vcxproj index 36ac12658..12cb43e07 100644 --- a/windows/rabit/rabit.vcxproj +++ b/windows/rabit/rabit.vcxproj @@ -34,7 +34,7 @@ MultiByte - Application + DynamicLibrary false true MultiByte @@ -86,6 +86,7 @@ MaxSpeed true true + MultiThreaded true