Skip to content

Commit

Permalink
Reformat code with clang-format 5.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Minoru committed Jul 29, 2018
1 parent c4ce35f commit 31d7221
Show file tree
Hide file tree
Showing 37 changed files with 112 additions and 60 deletions.
6 changes: 4 additions & 2 deletions include/configcontainer.h
Expand Up @@ -51,7 +51,8 @@ struct configdata {
, type(t)
, enum_values()
, multi_option(m)
{}
{
}

configdata(const std::string& v,
const std::unordered_set<std::string>& values)
Expand All @@ -60,7 +61,8 @@ struct configdata {
, type(configdata_t::ENUM)
, enum_values(values)
, multi_option(false)
{}
{
}

std::string value;
std::string default_value;
Expand Down
3 changes: 2 additions & 1 deletion include/configparser.h
Expand Up @@ -54,7 +54,8 @@ class null_config_action_handler : public config_action_handler {
~null_config_action_handler() override {}
void handle_action(const std::string&,
const std::vector<std::string>&) override
{}
{
}
void dump_config(std::vector<std::string>&) override {}
};

Expand Down
15 changes: 10 additions & 5 deletions include/exceptions.h
Expand Up @@ -13,7 +13,8 @@ class xmlexception : public std::exception {
public:
explicit xmlexception(const std::string& errmsg)
: msg(errmsg)
{}
{
}
~xmlexception() throw() override {}
const char* what() const throw() override
{
Expand All @@ -28,7 +29,8 @@ class configexception : public std::exception {
public:
explicit configexception(const std::string& errmsg)
: msg(errmsg)
{}
{
}
~configexception() throw() override {}
const char* what() const throw() override
{
Expand All @@ -43,7 +45,8 @@ class confighandlerexception : public std::exception {
public:
explicit confighandlerexception(const std::string& emsg)
: msg(emsg)
{}
{
}
explicit confighandlerexception(action_handler_status e);
~confighandlerexception() throw() override {}
const char* what() const throw() override
Expand All @@ -64,7 +67,8 @@ class dbexception : public std::exception {
public:
explicit dbexception(sqlite3* h)
: msg(sqlite3_errmsg(h))
{}
{
}
~dbexception() throw() override {}
const char* what() const throw() override
{
Expand All @@ -85,7 +89,8 @@ class matcherexception : public std::exception {
: type_(et)
, addinfo(info)
, addinfo2(info2)
{}
{
}

~matcherexception() throw() override {}
const char* what() const throw() override;
Expand Down
9 changes: 6 additions & 3 deletions include/htmlrenderer.h
Expand Up @@ -66,15 +66,17 @@ class htmlrenderer {
struct TableCell {
explicit TableCell(size_t s)
: span(s)
{}
{
}
size_t span;
std::vector<std::string> text; // multiline cell text
};

struct TableRow {
TableRow()
: inside(false)
{}
{
}

void add_text(const std::string& str);
void start_cell(size_t span);
Expand All @@ -88,7 +90,8 @@ class htmlrenderer {
explicit Table(bool b)
: inside(false)
, has_border(b)
{}
{
}

void add_text(const std::string& str);
void start_row();
Expand Down
3 changes: 2 additions & 1 deletion include/remote_api.h
Expand Up @@ -21,7 +21,8 @@ class remote_api {
public:
explicit remote_api(configcontainer* c)
: cfg(c)
{}
{
}
virtual ~remote_api() {}
virtual bool authenticate() = 0;
virtual std::vector<tagged_feedurl> get_subscribed_urls() = 0;
Expand Down
3 changes: 2 additions & 1 deletion rss/exception.cpp
Expand Up @@ -6,7 +6,8 @@ namespace rsspp {

exception::exception(const std::string& errmsg)
: emsg(errmsg)
{}
{
}

exception::~exception() throw() {}

Expand Down
6 changes: 4 additions & 2 deletions rss/parser.cpp
Expand Up @@ -38,7 +38,8 @@ parser::parser(unsigned int timeout,
, verify_ssl(ssl_verify)
, doc(0)
, lm(0)
{}
{
}

parser::~parser()
{
Expand All @@ -52,7 +53,8 @@ struct header_values {

header_values()
: lastmodified(0)
{}
{
}
};

static size_t handle_headers(void* ptr, size_t size, size_t nmemb, void* data)
Expand Down
6 changes: 4 additions & 2 deletions rss/rsspp.h
Expand Up @@ -31,7 +31,8 @@ class item {
item()
: guid_isPermaLink(false)
, pubDate_ts(0)
{}
{
}

std::string title;
std::string title_type;
Expand Down Expand Up @@ -65,7 +66,8 @@ class feed {
public:
feed()
: rss_version(UNKNOWN)
{}
{
}

std::string encoding;

Expand Down
15 changes: 10 additions & 5 deletions rss/rsspp_internal.h
Expand Up @@ -21,7 +21,8 @@ struct rss_parser {
virtual void parse_feed(feed& f, xmlNode* rootNode) = 0;
explicit rss_parser(xmlDocPtr d)
: doc(d)
{}
{
}
virtual ~rss_parser() {}
static std::string __w3cdtf_to_rfc822(const std::string& w3cdtf);

Expand All @@ -44,7 +45,8 @@ struct rss_09x_parser : public rss_parser {
explicit rss_09x_parser(xmlDocPtr doc)
: rss_parser(doc)
, ns(nullptr)
{}
{
}
~rss_09x_parser() override;

protected:
Expand All @@ -57,7 +59,8 @@ struct rss_09x_parser : public rss_parser {
struct rss_20_parser : public rss_09x_parser {
explicit rss_20_parser(xmlDocPtr doc)
: rss_09x_parser(doc)
{}
{
}
void parse_feed(feed& f, xmlNode* rootNode) override;
~rss_20_parser() override {}
};
Expand All @@ -66,7 +69,8 @@ struct rss_10_parser : public rss_parser {
void parse_feed(feed& f, xmlNode* rootNode) override;
explicit rss_10_parser(xmlDocPtr doc)
: rss_parser(doc)
{}
{
}
~rss_10_parser() override {}
};

Expand All @@ -75,7 +79,8 @@ struct atom_parser : public rss_parser {
explicit atom_parser(xmlDocPtr doc)
: rss_parser(doc)
, ns(0)
{}
{
}
~atom_parser() override {}

private:
Expand Down
3 changes: 2 additions & 1 deletion src/cache.cpp
Expand Up @@ -54,7 +54,8 @@ void cache::run_sql_nothrow(const std::string& query,
struct cb_handler {
cb_handler()
: c(-1)
{}
{
}
void set_count(int i)
{
c = i;
Expand Down
3 changes: 2 additions & 1 deletion src/colormanager.cpp
Expand Up @@ -20,7 +20,8 @@ namespace newsboat {

colormanager::colormanager()
: colors_loaded_(false)
{}
{
}

colormanager::~colormanager() {}

Expand Down
3 changes: 2 additions & 1 deletion src/configcontainer.cpp
Expand Up @@ -241,7 +241,8 @@ configcontainer::configcontainer()
configdata_t::STR)},
{"urlview-title-format",
configdata(_("%N %V - URLs"), configdata_t::STR)}}
{}
{
}

configcontainer::~configcontainer() {}

Expand Down
3 changes: 2 additions & 1 deletion src/controller.cpp
Expand Up @@ -91,7 +91,8 @@ controller::controller()
, rsscache(0)
, refresh_on_start(false)
, api(0)
{}
{
}

controller::~controller()
{
Expand Down
3 changes: 2 additions & 1 deletion src/dialogs_formaction.cpp
Expand Up @@ -14,7 +14,8 @@ namespace newsboat {
dialogs_formaction::dialogs_formaction(view* vv, std::string formstr)
: formaction(vv, formstr)
, update_list(true)
{}
{
}

dialogs_formaction::~dialogs_formaction() {}

Expand Down
3 changes: 2 additions & 1 deletion src/download.cpp
Expand Up @@ -19,7 +19,8 @@ download::download(pb_controller* c)
, curkbps(0.0)
, offs(0)
, ctrl(c)
{}
{
}

download::~download() {}

Expand Down
3 changes: 2 additions & 1 deletion src/downloadthread.cpp
Expand Up @@ -43,7 +43,8 @@ reloadrangethread::reloadrangethread(controller* c,
, e(end)
, ss(size)
, u(unattended)
{}
{
}

void reloadrangethread::operator()()
{
Expand Down
3 changes: 2 additions & 1 deletion src/exception.cpp
Expand Up @@ -12,7 +12,8 @@ namespace newsboat {

exception::exception(unsigned int error_code)
: ecode(error_code)
{}
{
}

exception::~exception() throw() {}

Expand Down
3 changes: 2 additions & 1 deletion src/feedhq_urlreader.cpp
Expand Up @@ -10,7 +10,8 @@ feedhq_urlreader::feedhq_urlreader(configcontainer* c,
: cfg(c)
, file(url_file)
, api(a)
{}
{
}

feedhq_urlreader::~feedhq_urlreader() {}

Expand Down
3 changes: 2 additions & 1 deletion src/help_formaction.cpp
Expand Up @@ -17,7 +17,8 @@ help_formaction::help_formaction(view* vv, std::string formstr)
: formaction(vv, formstr)
, quit(false)
, apply_search(false)
{}
{
}

help_formaction::~help_formaction() {}

Expand Down
3 changes: 2 additions & 1 deletion src/history.cpp
Expand Up @@ -6,7 +6,8 @@ namespace newsboat {

history::history()
: idx(0)
{}
{
}

history::~history() {}

Expand Down
3 changes: 2 additions & 1 deletion src/inoreader_urlreader.cpp
Expand Up @@ -10,7 +10,8 @@ inoreader_urlreader::inoreader_urlreader(configcontainer* c,
: cfg(c)
, file(url_file)
, api(a)
{}
{
}

inoreader_urlreader::~inoreader_urlreader() {}

Expand Down
3 changes: 2 additions & 1 deletion src/list_formaction.cpp
Expand Up @@ -6,7 +6,8 @@ namespace newsboat {

list_formaction::list_formaction(view* v, std::string formstr)
: formaction(v, formstr)
{}
{
}

void list_formaction::process_operation(operation op,
bool,
Expand Down
3 changes: 2 additions & 1 deletion src/logger.cpp
Expand Up @@ -10,7 +10,8 @@ std::mutex logger::instanceMutex;

logger::logger()
: curlevel(level::NONE)
{}
{
}

void logger::set_logfile(const std::string& logfile)
{
Expand Down
3 changes: 2 additions & 1 deletion src/newsblur_urlreader.cpp
Expand Up @@ -8,7 +8,8 @@ newsblur_urlreader::newsblur_urlreader(const std::string& url_file,
remote_api* a)
: file(url_file)
, api(a)
{}
{
}

newsblur_urlreader::~newsblur_urlreader() {}

Expand Down
3 changes: 2 additions & 1 deletion src/ocnews_urlreader.cpp
Expand Up @@ -7,7 +7,8 @@ namespace newsboat {
ocnews_urlreader::ocnews_urlreader(const std::string& url_file, remote_api* a)
: file(url_file)
, api(a)
{}
{
}

ocnews_urlreader::~ocnews_urlreader() {}

Expand Down
3 changes: 2 additions & 1 deletion src/oldreader_urlreader.cpp
Expand Up @@ -10,7 +10,8 @@ oldreader_urlreader::oldreader_urlreader(configcontainer* c,
: cfg(c)
, file(url_file)
, api(a)
{}
{
}

oldreader_urlreader::~oldreader_urlreader() {}

Expand Down
3 changes: 2 additions & 1 deletion src/queueloader.cpp
Expand Up @@ -19,7 +19,8 @@ namespace podboat {
queueloader::queueloader(const std::string& file, pb_controller* c)
: queuefile(file)
, ctrl(c)
{}
{
}

void queueloader::reload(std::vector<download>& downloads, bool remove_unplayed)
{
Expand Down

0 comments on commit 31d7221

Please sign in to comment.