diff options
author | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 12:17:58 +0400 |
---|---|---|
committer | Tetsuo Kiso <tetsuo-s@is.naist.jp> | 2012-02-01 12:17:58 +0400 |
commit | 194e24115adde476df107f5f5ef366eca3b86523 (patch) | |
tree | 5979f634a4a4d75d0b9f022b6bd38ef47d557d26 /mert/Data.cpp | |
parent | 380f550cf3d2b1150a6868ed6725ce55c1687070 (diff) |
Change casts to C++ style casts, and delete unnecessary casts.
Diffstat (limited to 'mert/Data.cpp')
-rw-r--r-- | mert/Data.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mert/Data.cpp b/mert/Data.cpp index a3c6fc314..3e723f8be 100644 --- a/mert/Data.cpp +++ b/mert/Data.cpp @@ -255,8 +255,8 @@ void Data::createShards(size_t shard_count, float shard_size, const string& scor vector<size_t> shard_contents; if (shard_size == 0) { //split into roughly equal size shards - size_t shard_start = floor(0.5 + shard_id * (float)data_size / shard_count); - size_t shard_end = floor(0.5 + (shard_id+1) * (float)data_size / shard_count); + const size_t shard_start = floor(0.5 + shard_id * static_cast<float>(data_size) / shard_count); + const size_t shard_end = floor(0.5 + (shard_id + 1) * static_cast<float>(data_size) / shard_count); for (size_t i = shard_start; i < shard_end; ++i) { shard_contents.push_back(i); } |