diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-10-09 20:20:34 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-10-09 20:20:34 +0000 |
commit | 4808617ef54d40efcf1a3ed30525898defb74e10 (patch) | |
tree | e16763eb646fdf3dea7c32a8d57c147356be9299 /src/membuf.cpp | |
parent | fecbea5970bb89c15b35f5df5b09914b4c91efe0 (diff) | |
download | libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.gz libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.bz2 libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.tar.xz libbu++-4808617ef54d40efcf1a3ed30525898defb74e10.zip |
More cache development. I'm going to have to switch from template functions to
functors. I like template functions a little more, but functors can be at
least as fast. It won't be much of a change.
Diffstat (limited to 'src/membuf.cpp')
-rw-r--r-- | src/membuf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/membuf.cpp b/src/membuf.cpp index e7c7ac8..f22a8de 100644 --- a/src/membuf.cpp +++ b/src/membuf.cpp | |||
@@ -52,7 +52,7 @@ size_t Bu::MemBuf::write( const void *pBuf, size_t nBytes ) | |||
52 | { | 52 | { |
53 | // Trickier, we must do this in two parts, overwrite, then append | 53 | // Trickier, we must do this in two parts, overwrite, then append |
54 | // Frist, overwrite. | 54 | // Frist, overwrite. |
55 | int iOver = sBuf.getSize() - nPos; | 55 | size_t iOver = sBuf.getSize() - nPos; |
56 | if( iOver > nBytes ) | 56 | if( iOver > nBytes ) |
57 | iOver = nBytes; | 57 | iOver = nBytes; |
58 | memcpy( sBuf.getStr()+nPos, pBuf, iOver ); | 58 | memcpy( sBuf.getStr()+nPos, pBuf, iOver ); |