Skip to content

Commit

Permalink
Убран нерекомендуемый const для возвращаемого значения функции для кр…
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lt committed Jul 4, 2024
1 parent 9daefb2 commit b97c2c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/apps/mplayerc/TorrentInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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] != ':') {
Expand Down Expand Up @@ -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) {
Expand Down
8 changes: 4 additions & 4 deletions src/apps/mplayerc/TorrentInfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) 2019 see Authors.txt
* (C) 2019-2024 see Authors.txt
*
* This file is part of MPC-BE.
*
Expand Down Expand Up @@ -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<std::string>& list) const;

private:
Expand Down

0 comments on commit b97c2c3

Please sign in to comment.