diff --git a/src/apps/mplayerc/TorrentInfo.cpp b/src/apps/mplayerc/TorrentInfo.cpp index aed60ff508..5ea2abcb79 100644 --- a/src/apps/mplayerc/TorrentInfo.cpp +++ b/src/apps/mplayerc/TorrentInfo.cpp @@ -120,7 +120,7 @@ const bool CTorrentInfo::Read(const wchar_t* fileName) return true; } -const std::wstring CTorrentInfo::Magnet() const +std::wstring CTorrentInfo::Magnet() const { std::wstring magnet; @@ -223,7 +223,7 @@ const __int64 CTorrentInfo::ReadInteger() return _atoi64(num.c_str()); } -const std::string CTorrentInfo::ReadString() +std::string CTorrentInfo::ReadString() { std::string len; while (m_offset < m_data.size() && m_data[m_offset] != ':') { @@ -261,7 +261,7 @@ const bt_node* CTorrentInfo::Search(const char* nodeName, const bt_node* nodePar return nullptr; } -const std::wstring CTorrentInfo::CalcInfoHash() const +std::wstring CTorrentInfo::CalcInfoHash() const { auto info = Search("info", m_root); if (!info || info->type != bt_node::dt_dictionary) { diff --git a/src/apps/mplayerc/TorrentInfo.h b/src/apps/mplayerc/TorrentInfo.h index d063e8d0d0..c0df77349b 100644 --- a/src/apps/mplayerc/TorrentInfo.h +++ b/src/apps/mplayerc/TorrentInfo.h @@ -1,5 +1,5 @@ /* - * (C) 2019 see Authors.txt + * (C) 2019-2024 see Authors.txt * * This file is part of MPC-BE. * @@ -30,15 +30,15 @@ class CTorrentInfo ~CTorrentInfo(); const bool Read(const wchar_t* fileName); - const std::wstring Magnet() const; + std::wstring Magnet() const; private: bt_node* Decode(); const __int64 ReadInteger(); - const std::string ReadString(); + std::string ReadString(); const bt_node* Search(const char* nodeName, const bt_node* nodeParent) const; - const std::wstring CalcInfoHash() const; + std::wstring CalcInfoHash() const; void GetAnnounceList(const bt_node* nodeAnnounce, std::list& list) const; private: