From c67967161e9863a7da5554ab695c5f798d3ebc67 Mon Sep 17 00:00:00 2001 From: tqchen Date: Sun, 19 Apr 2015 00:21:38 -0700 Subject: [PATCH] fix io style --- include/dmlc/io.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dmlc/io.h b/include/dmlc/io.h index 4feeb30d2..f808094c1 100644 --- a/include/dmlc/io.h +++ b/include/dmlc/io.h @@ -345,13 +345,13 @@ inline int ostream::OutBuf::sync(void) { if (stream_ == NULL) return -1; std::ptrdiff_t n = pptr() - pbase(); stream_->Write(pbase(), n); - this->pbump(-n); + this->pbump(-static_cast(n)); return 0; } inline int ostream::OutBuf::overflow(int c) { *(this->pptr()) = c; std::ptrdiff_t n = pptr() - pbase(); - this->pbump(-n); + this->pbump(-static_cast(n)); if (c == EOF) { stream_->Write(pbase(), n); } else {