diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-06-04 22:33:46 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2014-06-04 22:33:46 +0900 |
| commit | 9b54272190a333f83fb6c7f66875341627e21a70 (patch) | |
| tree | 28776a2ef67bd0a62611c2cfee33f7cdce431c3e /src/FileEntry.cc | |
| parent | 4f3c526dcdf5fce74dd12be1c882f6c47d1829ec (diff) | |
FileEntry::getUris: Return std::vector<std::string>
Diffstat (limited to 'src/FileEntry.cc')
| -rw-r--r-- | src/FileEntry.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/FileEntry.cc b/src/FileEntry.cc index 9fb08d03..e500f67f 100644 --- a/src/FileEntry.cc +++ b/src/FileEntry.cc @@ -115,10 +115,11 @@ int64_t FileEntry::gtoloff(int64_t goff) const return goff-offset_; } -void FileEntry::getUris(std::vector<std::string>& uris) const +std::vector<std::string> FileEntry::getUris() const { - uris.insert(uris.end(), spentUris_.begin(), spentUris_.end()); - uris.insert(uris.end(), uris_.begin(), uris_.end()); + std::vector<std::string> uris(std::begin(spentUris_), std::end(spentUris_)); + uris.insert(std::end(uris), std::begin(uris_), std::end(uris_)); + return uris; } namespace { @@ -588,8 +589,7 @@ void writeFilePath bool memory) { if(entry->getPath().empty()) { - std::vector<std::string> uris; - entry->getUris(uris); + auto uris = entry->getUris(); if(uris.empty()) { o << "n/a"; } else { |
