summaryrefslogtreecommitdiff
path: root/src/CheckIntegrityEntry.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:39:47 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-12-27 18:40:08 +0900
commitb1132d6b10cd3791b9529d7031d723fd0e2d8215 (patch)
tree9ce465b42bf09372118335c7c619bb2b41869eaf /src/CheckIntegrityEntry.cc
parent4abad2f64c9ff80144a61c5a9c2bea144852b883 (diff)
make clang-format using clang-format-3.6
Diffstat (limited to 'src/CheckIntegrityEntry.cc')
-rw-r--r--src/CheckIntegrityEntry.cc41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/CheckIntegrityEntry.cc b/src/CheckIntegrityEntry.cc
index 3f23a7fa..9a634050 100644
--- a/src/CheckIntegrityEntry.cc
+++ b/src/CheckIntegrityEntry.cc
@@ -46,58 +46,55 @@ namespace aria2 {
CheckIntegrityEntry::CheckIntegrityEntry(RequestGroup* requestGroup,
std::unique_ptr<Command> nextCommand)
- : RequestGroupEntry{requestGroup, std::move(nextCommand)}
-{}
+ : RequestGroupEntry{requestGroup, std::move(nextCommand)}
+{
+}
CheckIntegrityEntry::~CheckIntegrityEntry() {}
-void CheckIntegrityEntry::validateChunk()
-{
- validator_->validateChunk();
-}
+void CheckIntegrityEntry::validateChunk() { validator_->validateChunk(); }
int64_t CheckIntegrityEntry::getTotalLength()
{
- if(!validator_) {
+ if (!validator_) {
return 0;
- } else {
+ }
+ else {
return validator_->getTotalLength();
}
}
int64_t CheckIntegrityEntry::getCurrentLength()
{
- if(!validator_) {
+ if (!validator_) {
return 0;
- } else {
+ }
+ else {
return validator_->getCurrentOffset();
}
}
-bool CheckIntegrityEntry::finished()
-{
- return validator_->finished();
-}
+bool CheckIntegrityEntry::finished() { return validator_->finished(); }
void CheckIntegrityEntry::cutTrailingGarbage()
{
getRequestGroup()->getPieceStorage()->getDiskAdaptor()->cutTrailingGarbage();
}
-void CheckIntegrityEntry::proceedFileAllocation
-(std::vector<std::unique_ptr<Command>>& commands,
- std::unique_ptr<FileAllocationEntry> entry,
- DownloadEngine* e)
+void CheckIntegrityEntry::proceedFileAllocation(
+ std::vector<std::unique_ptr<Command>>& commands,
+ std::unique_ptr<FileAllocationEntry> entry, DownloadEngine* e)
{
- if(getRequestGroup()->needsFileAllocation()) {
+ if (getRequestGroup()->needsFileAllocation()) {
e->getFileAllocationMan()->pushEntry(std::move(entry));
- } else {
+ }
+ else {
entry->prepareForNextAction(commands, e);
}
}
-void CheckIntegrityEntry::setValidator
-(std::unique_ptr<IteratableValidator> validator)
+void CheckIntegrityEntry::setValidator(
+ std::unique_ptr<IteratableValidator> validator)
{
validator_ = std::move(validator);
}