summaryrefslogtreecommitdiffstats
path: root/libktorrent/torrent/singlefilecache.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-18 18:13:41 -0600
committerSlávek Banko <[email protected]>2012-06-06 03:48:48 +0200
commit1d7c126b63cbc97bba847f61e7c9ee89b80a390c (patch)
tree7e3767afd7f1d73a50f07236dc19f49b7cec287d /libktorrent/torrent/singlefilecache.cpp
parent5fae492e67ad058cae62c9e58d33645472157067 (diff)
downloadktorrent-1d7c126b63cbc97bba847f61e7c9ee89b80a390c.tar.gz
ktorrent-1d7c126b63cbc97bba847f61e7c9ee89b80a390c.zip
Rename old tq methods that no longer need a unique name
(cherry picked from commit a90eb215f53c95d81f95b32255098066d90556d9)
Diffstat (limited to 'libktorrent/torrent/singlefilecache.cpp')
-rw-r--r--libktorrent/torrent/singlefilecache.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libktorrent/torrent/singlefilecache.cpp b/libktorrent/torrent/singlefilecache.cpp
index 4843c1f..8986f98 100644
--- a/libktorrent/torrent/singlefilecache.cpp
+++ b/libktorrent/torrent/singlefilecache.cpp
@@ -76,7 +76,7 @@ namespace bt
{
// mmap continuously fails, so stop using it
c->allocate();
- c->settqStatus(Chunk::BUFFERED);
+ c->setStatus(Chunk::BUFFERED);
}
else
{
@@ -88,7 +88,7 @@ namespace bt
// buffer it if mmapping fails
Out(SYS_GEN|LOG_IMPORTANT) << "Warning : mmap failure, falling back to buffered mode" << endl;
c->allocate();
- c->settqStatus(Chunk::BUFFERED);
+ c->setStatus(Chunk::BUFFERED);
}
else
{
@@ -105,7 +105,7 @@ namespace bt
if (mmap_failures >= 3 || !(buf = (Uint8*)fd->map(c,off,c->getSize(),CacheFile::READ)))
{
c->allocate();
- c->settqStatus(Chunk::BUFFERED);
+ c->setStatus(Chunk::BUFFERED);
fd->read(c->getData(),c->getSize(),off);
if (mmap_failures < 3)
mmap_failures++;
@@ -119,18 +119,18 @@ namespace bt
void SingleFileCache::save(Chunk* c)
{
// unmap the chunk if it is mapped
- if (c->gettqStatus() == Chunk::MMAPPED)
+ if (c->getStatus() == Chunk::MMAPPED)
{
fd->unmap(c->getData(),c->getSize());
c->clear();
- c->settqStatus(Chunk::ON_DISK);
+ c->setStatus(Chunk::ON_DISK);
}
- else if (c->gettqStatus() == Chunk::BUFFERED)
+ else if (c->getStatus() == Chunk::BUFFERED)
{
Uint64 off = c->getIndex() * tor.getChunkSize();
fd->write(c->getData(),c->getSize(),off);
c->clear();
- c->settqStatus(Chunk::ON_DISK);
+ c->setStatus(Chunk::ON_DISK);
}
}