Removed superfluous const.
This commit is contained in:
parent
d49a84ac3e
commit
d02ca95345
|
@ -109,7 +109,7 @@ std::uint16_t read_config(string &instance, string &access_token, string &feedur
|
|||
cerr << "Error code: " << ret << '\n';
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (feedurl.empty())
|
||||
{
|
||||
|
@ -177,7 +177,7 @@ std::uint16_t read_config(string &instance, string &access_token, string &feedur
|
|||
}
|
||||
|
||||
|
||||
const bool write_config()
|
||||
bool write_config()
|
||||
{
|
||||
std::ofstream outfile(filepath + "config-" + profile + ".json");
|
||||
if (outfile.is_open())
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* This file is part of mastorss.
|
||||
* Copyright © 2018 tastytea <tastytea@tastytea.de>
|
||||
*
|
||||
* Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
|
@ -37,7 +37,8 @@ void curlpp_init()
|
|||
curlpp::initialize();
|
||||
}
|
||||
|
||||
const std::uint16_t http_get(const string &feedurl, string &answer, const string &useragent)
|
||||
std::uint16_t http_get(const string &feedurl, string &answer,
|
||||
const string &useragent)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -51,7 +52,7 @@ const std::uint16_t http_get(const string &feedurl, string &answer, const string
|
|||
});
|
||||
request.setOpt<curlopts::FollowLocation>(true);
|
||||
request.setOpt<curlopts::WriteStream>(&oss);
|
||||
|
||||
|
||||
request.perform();
|
||||
std::uint16_t ret = curlpp::infos::ResponseCode::get(request);
|
||||
if (ret == 200 || ret == 302 || ret == 307)
|
||||
|
|
|
@ -1,3 +1,19 @@
|
|||
/* This file is part of mastorss.
|
||||
* Copyright © 2018, 2019 tastytea <tastytea@tastytea.de>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef mastorss_HPP
|
||||
#define mastorss_HPP
|
||||
|
||||
|
@ -15,12 +31,12 @@ extern Json::Value config;
|
|||
extern std::string profile;
|
||||
|
||||
std::uint16_t read_config(string &instance, string &access_token, string &feedurl);
|
||||
const bool write_config();
|
||||
bool write_config();
|
||||
|
||||
std::vector<Mastodon::Easy::Status> parse_feed(const string &xml);
|
||||
void individual_fixes(string &str);
|
||||
|
||||
const std::uint16_t http_get(const string &feedurl,
|
||||
std::uint16_t http_get(const string &feedurl,
|
||||
string &answer, const string &useragent = "");
|
||||
void curlpp_init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user