diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-07-04 15:26:00 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-07-04 15:26:00 +0000 |
| commit | 24d258cf66a18ebff73dfc2baea10fc85b7e3fbf (patch) | |
| tree | 5b01b8171c6246d747b9687562fb4cbdd70b4676 /src/FileEntry.h | |
| parent | f8fd518229f7c63291ab2fa8b6cb7caa3958ad60 (diff) | |
2009-07-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Call RequestGroup::createNextCommandWithAdj() from
BtFileAllocationEntry if at least one FileEntry has URI. The
static function hasAssociatedUri in RequestGroup.cc is renamed as
isUriSuppliedForRequsetFileEntry() and placed in FileEntry.h.
* src/BtFileAllocationEntry.cc
* src/FileEntry.h
* src/RequestGroup.cc
Diffstat (limited to 'src/FileEntry.h')
| -rw-r--r-- | src/FileEntry.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/FileEntry.h b/src/FileEntry.h index a52b2f02..74716141 100644 --- a/src/FileEntry.h +++ b/src/FileEntry.h @@ -265,6 +265,18 @@ size_t countRequestedFileEntry(InputIterator first, InputIterator last) return count; } +// Returns true if at least one requested FileEntry has URIs. +template<typename InputIterator> +bool isUriSuppliedForRequsetFileEntry(InputIterator first, InputIterator last) +{ + for(; first != last; ++first) { + if((*first)->isRequested() && !(*first)->getRemainingUris().empty()) { + return true; + } + } + return false; +} + // Writes first filename to given o. If memory is true, the output is // "[MEMORY]" plus the basename of the first filename. If there is no // FileEntry, writes "n/a" to o. If more than 1 FileEntry are in the |
