Skip to content

Commit 1710f4b

Browse files
committed
Replace boost::to_lower with ToLower
1 parent 5b66db1 commit 1710f4b

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

src/gridcoin/researcher.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bool UpdateRWSettingsForMode(const ResearcherMode mode, const std::string& email
8787
//!
8888
std::string LowerUnderscore(std::string data)
8989
{
90-
boost::to_lower(data);
90+
data = ToLower(data);
9191
boost::replace_all(data, "_", " ");
9292

9393
return data;
@@ -304,7 +304,7 @@ std::set<std::string> GetTeamWhitelist()
304304
continue;
305305
}
306306

307-
boost::to_lower(team_name);
307+
team_name = ToLower(team_name);
308308

309309
teams.emplace(std::move(team_name));
310310
}
@@ -794,7 +794,7 @@ MiningProject::MiningProject(std::string name,
794794
, m_rac(std::move(rac))
795795
, m_error(Error::NONE)
796796
{
797-
boost::to_lower(m_team);
797+
m_team = ToLower(m_team);
798798
}
799799

800800
MiningProject MiningProject::Parse(const std::string& xml)
@@ -1106,7 +1106,7 @@ std::string Researcher::Email()
11061106
if (gArgs.GetBoolArg("-investor", false)) return email;
11071107

11081108
email = gArgs.GetArg("-email", "");
1109-
boost::to_lower(email);
1109+
email = ToLower(email);
11101110

11111111
return email;
11121112
}
@@ -1353,7 +1353,7 @@ GRC::BeaconError Researcher::BeaconError() const
13531353

13541354
bool Researcher::ChangeMode(const ResearcherMode mode, std::string email)
13551355
{
1356-
boost::to_lower(email);
1356+
email = ToLower(email);
13571357

13581358
if (mode == ResearcherMode::INVESTOR && ConfiguredForInvestorMode()) {
13591359
return true;

src/gridcoin/upgrade.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool Upgrade::CheckForLatestUpdate(std::string& client_message_out, bool ui_dial
9393
return false;
9494
}
9595

96-
boost::to_lower(GithubReleaseTypeData);
96+
GithubReleaseTypeData = ToLower(GithubReleaseTypeData);
9797
if (GithubReleaseTypeData.find("leisure") != std::string::npos)
9898
GithubReleaseType = _("leisure");
9999

src/gridcoin/voting/registry.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ namespace {
3434
std::string ParseLegacyVoteTitle(const std::string& key)
3535
{
3636
std::string title = key.substr(0, key.find(';'));
37-
boost::to_lower(title);
37+
title = ToLower(title);
3838

3939
return title;
4040
}
@@ -801,7 +801,7 @@ void PollRegistry::AddPoll(const ContractContext& ctx)
801801
// The title used as the key for the m_poll map keyed by title, and also checked for duplicates, should
802802
// not be case-sensitive, regardless of whether v1 or v2+. We should not be allowing the insertion of two v2 polls
803803
// with the same title except for a difference in case.
804-
boost::to_lower(poll_title);
804+
poll_title = ToLower(poll_title);
805805

806806
auto result_pair = m_polls.emplace(std::move(poll_title), PollReference());
807807

src/gridcoin/voting/result.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class LegacyVoteCounterContext
635635
if (m_legacy_choices_cache.empty()) {
636636
for (uint8_t i = 0; i < m_poll.Choices().size(); ++i) {
637637
std::string label = m_poll.Choices().At(i)->m_label;
638-
boost::to_lower(label);
638+
label = ToLower(label);
639639

640640
m_legacy_choices_cache.emplace(std::move(label), i);
641641
}

src/gridcoin/voting/vote.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ LegacyVote::ParseResponses(const std::map<std::string, uint8_t>& choice_map) con
7979
std::vector<std::pair<uint8_t, uint64_t>> responses;
8080

8181
for (auto& answer : answers) {
82-
boost::to_lower(answer);
82+
answer = ToLower(answer);
8383

8484
auto iter = choice_map.find(answer);
8585

src/netbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bool fNameLookup = false;
3030
static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
3131

3232
enum Network ParseNetwork(std::string net) {
33-
boost::to_lower(net);
33+
net = ToLower(net);
3434
if (net == "ipv4") return NET_IPV4;
3535
if (net == "ipv6") return NET_IPV6;
3636
if (net == "tor") return NET_TOR;

src/rpc/protocol.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int ReadHTTPHeaders(std::basic_istream<char>& stream, std::map<std::string, std:
110110
{
111111
std::string strHeader = str.substr(0, nColon);
112112
boost::trim(strHeader);
113-
boost::to_lower(strHeader);
113+
strHeader = ToLower(strHeader);
114114
std::string strValue = str.substr(nColon+1);
115115
boost::trim(strValue);
116116
mapHeadersRet[strHeader] = strValue;

0 commit comments

Comments
 (0)