diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-12 00:09:42 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-06-12 00:09:42 +0900 |
| commit | 81e6b6844371f2976f69235764296c83a0bc290c (patch) | |
| tree | 254732698d327ac922d58e72e8f1780271c88df4 /src/aria2api.cc | |
| parent | f4085b310f14eeee63dc21cac18851cfbae4f838 (diff) | |
Pass A2Gid by value, since it is uint64_t
Diffstat (limited to 'src/aria2api.cc')
| -rw-r--r-- | src/aria2api.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/aria2api.cc b/src/aria2api.cc index f295a6a1..ff7beb65 100644 --- a/src/aria2api.cc +++ b/src/aria2api.cc @@ -174,7 +174,7 @@ int shutdown(Session* session, bool force) return 0; } -std::string gidToHex(const A2Gid& gid) +std::string gidToHex(A2Gid gid) { return GroupId::toHex(gid); } @@ -189,7 +189,7 @@ A2Gid hexToGid(const std::string& hex) } } -bool isNull(const A2Gid& gid) +bool isNull(A2Gid gid) { return gid == 0; } @@ -382,7 +382,7 @@ int addTorrent(Session* session, options, position); } -int removeDownload(Session* session, const A2Gid& gid, bool force) +int removeDownload(Session* session, A2Gid gid, bool force) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); @@ -408,7 +408,7 @@ int removeDownload(Session* session, const A2Gid& gid, bool force) return 0; } -int pauseDownload(Session* session, const A2Gid& gid, bool force) +int pauseDownload(Session* session, A2Gid gid, bool force) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); @@ -423,7 +423,7 @@ int pauseDownload(Session* session, const A2Gid& gid, bool force) return -1; } -int unpauseDownload(Session* session, const A2Gid& gid) +int unpauseDownload(Session* session, A2Gid gid) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); @@ -439,7 +439,7 @@ int unpauseDownload(Session* session, const A2Gid& gid) return 0; } -int changePosition(Session* session, const A2Gid& gid, int pos, OffsetMode how) +int changePosition(Session* session, A2Gid gid, int pos, OffsetMode how) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); @@ -451,7 +451,7 @@ int changePosition(Session* session, const A2Gid& gid, int pos, OffsetMode how) } } -int changeOption(Session* session, const A2Gid& gid, const KeyVals& options) +int changeOption(Session* session, A2Gid gid, const KeyVals& options) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); @@ -942,7 +942,7 @@ struct DownloadResultDH : public DownloadHandle { }; } // namespace -DownloadHandle* getDownloadHandle(Session* session, const A2Gid& gid) +DownloadHandle* getDownloadHandle(Session* session, A2Gid gid) { const SharedHandle<DownloadEngine>& e = session->context->reqinfo->getDownloadEngine(); |
