diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-08 23:26:51 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | 7989cd898dc0bfef40ab1a7e2b747676620d6517 (patch) | |
| tree | 62552567c7890a84b3acd12c899ff9235e2523ee /src/RpcMethodImpl.h | |
| parent | 30e0e19e671697f8f62b43b1e03772ad29ca2407 (diff) | |
Use int or int32_t instead of size_t where suitable
Diffstat (limited to 'src/RpcMethodImpl.h')
| -rw-r--r-- | src/RpcMethodImpl.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/RpcMethodImpl.h b/src/RpcMethodImpl.h index 46c42394..fb1cccc1 100644 --- a/src/RpcMethodImpl.h +++ b/src/RpcMethodImpl.h @@ -331,11 +331,11 @@ private: template<typename InputIterator> std::pair<InputIterator, InputIterator> getPaginationRange - (ssize_t offset, size_t num, InputIterator first, InputIterator last) + (int offset, int num, InputIterator first, InputIterator last) { - size_t size = std::distance(first, last); + int size = std::distance(first, last); if(offset < 0) { - ssize_t tempoffset = offset+size; + int tempoffset = offset+size; if(tempoffset < 0) { return std::make_pair(last, last); } @@ -344,10 +344,10 @@ private: offset = 0; num = tempoffset+1; } - } else if(size <= (size_t)offset) { + } else if(size <= offset) { return std::make_pair(last, last); } - size_t lastDistance; + int lastDistance; if(size < offset+num) { lastDistance = size; } else { @@ -369,8 +369,8 @@ protected: if(numParam->i() < 0) { throw DL_ABORT_EX("The parameter num must be zero or positive integer."); } - ssize_t offset = offsetParam->i(); - size_t num = numParam->i(); + int offset = offsetParam->i(); + int num = numParam->i(); std::vector<std::string> keys; toStringList(std::back_inserter(keys), keysParam); const std::deque<SharedHandle<T> >& items = getItems(e); |
