refactor(clang-tidy): Apply fixes
This commit is contained in:
parent
0128014d44
commit
ff9be848c7
119 changed files with 1752 additions and 1046 deletions
|
@ -3,6 +3,7 @@
|
|||
#include "common.hpp"
|
||||
#include "components/config.hpp"
|
||||
#include "components/types.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "utils/concurrency.hpp"
|
||||
#include "utils/throttle.hpp"
|
||||
#include "x11/connection.hpp"
|
||||
|
@ -28,7 +29,7 @@ class bar : public xpp::event::sink<evt::button_press, evt::expose, evt::propert
|
|||
|
||||
const bar_settings settings() const;
|
||||
|
||||
void parse(string data, bool force = false);
|
||||
void parse(const string& data, bool force = false);
|
||||
|
||||
protected:
|
||||
void setup_monitor();
|
||||
|
|
|
@ -31,7 +31,7 @@ class builder {
|
|||
void append(string text);
|
||||
void node(string str, bool add_space = false);
|
||||
void node(string str, int font_index, bool add_space = false);
|
||||
void node(label_t label, bool add_space = false);
|
||||
void node(const label_t& label, bool add_space = false);
|
||||
void offset(int pixels = 0);
|
||||
void space(int width = DEFAULT_SPACING);
|
||||
void remove_trailing_space(int width = DEFAULT_SPACING);
|
||||
|
@ -42,15 +42,15 @@ class builder {
|
|||
void color(string color);
|
||||
void color_alpha(string alpha);
|
||||
void color_close();
|
||||
void line_color(string color);
|
||||
void line_color(const string& color);
|
||||
void line_color_close();
|
||||
void overline_color(string color);
|
||||
void overline_color_close();
|
||||
void underline_color(string color);
|
||||
void underline_color_close();
|
||||
void overline(string color = "");
|
||||
void overline(const string& color = "");
|
||||
void overline_close();
|
||||
void underline(string color = "");
|
||||
void underline(const string& color = "");
|
||||
void underline_close();
|
||||
void cmd(mousebtn index, string action, bool condition = true);
|
||||
void cmd_close();
|
||||
|
@ -59,7 +59,7 @@ class builder {
|
|||
string background_hex();
|
||||
string foreground_hex();
|
||||
|
||||
void tag_open(syntaxtag tag, string value);
|
||||
void tag_open(syntaxtag tag, const string& value);
|
||||
void tag_open(attribute attr);
|
||||
void tag_close(syntaxtag tag);
|
||||
void tag_close(attribute attr);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
#include "errors.hpp"
|
||||
|
||||
POLYBAR_NS
|
||||
|
||||
|
@ -40,15 +41,15 @@ namespace command_line {
|
|||
|
||||
bool has(const string& option) const;
|
||||
string get(string opt) const;
|
||||
bool compare(string opt, string val) const;
|
||||
bool compare(string opt, const string& val) const;
|
||||
|
||||
protected:
|
||||
auto is_short(string option, string opt_short) const;
|
||||
auto is_long(string option, string opt_long) const;
|
||||
auto is(string option, string opt_short, string opt_long) const;
|
||||
auto is_short(const string& option, const string& opt_short) const;
|
||||
auto is_long(const string& option, const string& opt_long) const;
|
||||
auto is(const string& option, string opt_short, string opt_long) const;
|
||||
|
||||
auto parse_value(string input, string input_next, choices values) const;
|
||||
void parse(string input, string input_next = "");
|
||||
auto parse_value(string input, const string& input_next, choices values) const;
|
||||
void parse(const string& input, const string& input_next = "");
|
||||
|
||||
private:
|
||||
string m_synopsis;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include "common.hpp"
|
||||
#include "components/logger.hpp"
|
||||
#include "errors.hpp"
|
||||
#include "utils/env.hpp"
|
||||
#include "utils/string.hpp"
|
||||
#include "x11/xresources.hpp"
|
||||
|
@ -30,7 +31,7 @@ class config {
|
|||
string bar_section() const;
|
||||
vector<string> defined_bars() const;
|
||||
string build_path(const string& section, const string& key) const;
|
||||
void warn_deprecated(string section, string key, string replacement) const;
|
||||
void warn_deprecated(const string& section, const string& key, string replacement) const;
|
||||
|
||||
/**
|
||||
* Get parameter for the current bar by name
|
||||
|
|
|
@ -52,7 +52,7 @@ class controller {
|
|||
void bootstrap_modules();
|
||||
|
||||
void on_ipc_action(const ipc_action& message);
|
||||
void on_mouse_event(string input);
|
||||
void on_mouse_event(const string& input);
|
||||
void on_unrecognized_action(string input);
|
||||
void on_update();
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class eventloop {
|
|||
void forward_event(entry_t evt);
|
||||
|
||||
void on_update();
|
||||
void on_input(string input);
|
||||
void on_input(char* input);
|
||||
void on_check();
|
||||
void on_quit();
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ class ipc {
|
|||
|
||||
protected:
|
||||
void parse(const string& payload) const;
|
||||
void delegate(const ipc_command& msg) const;
|
||||
void delegate(const ipc_hook& msg) const;
|
||||
void delegate(const ipc_action& msg) const;
|
||||
void delegate(const ipc_command& message) const;
|
||||
void delegate(const ipc_hook& message) const;
|
||||
void delegate(const ipc_action& message) const;
|
||||
|
||||
private:
|
||||
const logger& m_log;
|
||||
|
|
|
@ -15,7 +15,7 @@ enum class loglevel {
|
|||
TRACE,
|
||||
};
|
||||
|
||||
loglevel parse_loglevel_name(string name);
|
||||
loglevel parse_loglevel_name(const string& name);
|
||||
|
||||
class logger {
|
||||
public:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
#include "errors.hpp"
|
||||
|
||||
POLYBAR_NS
|
||||
|
||||
|
@ -24,9 +25,9 @@ class parser {
|
|||
protected:
|
||||
uint32_t parse_color(string s, uint32_t fallback = 0);
|
||||
int8_t parse_fontindex(string s);
|
||||
attribute parse_attr(const char s);
|
||||
attribute parse_attr(const char attr);
|
||||
mousebtn parse_action_btn(string data);
|
||||
string parse_action_cmd(string data);
|
||||
string parse_action_cmd(const string& data);
|
||||
|
||||
private:
|
||||
const logger& m_log;
|
||||
|
|
|
@ -44,7 +44,7 @@ class renderer {
|
|||
void draw_character(const uint16_t character);
|
||||
void draw_textstring(const char* text, const size_t len);
|
||||
|
||||
void begin_action(const mousebtn btn, const string cmd);
|
||||
void begin_action(const mousebtn btn, const string& cmd);
|
||||
void end_action(const mousebtn btn);
|
||||
const vector<action_block> get_actions();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue