chore: cpplint fixes hyprland classes

This commit is contained in:
Austin Horstman 2023-09-02 23:34:11 -05:00
parent 8fc4187713
commit 4cb8efbecc
No known key found for this signature in database
5 changed files with 8 additions and 9 deletions

View File

@ -167,12 +167,14 @@ std::string IPC::getSocket1Reply(const std::string& rq) {
std::string socketPath = "/tmp/hypr/" + instanceSigStr + "/.socket.sock";
// Use snprintf to copy the socketPath string into serverAddress.sun_path
if (snprintf(serverAddress.sun_path, sizeof(serverAddress.sun_path), "%s", socketPath.c_str()) < 0) {
if (snprintf(serverAddress.sun_path, sizeof(serverAddress.sun_path), "%s", socketPath.c_str()) <
0) {
spdlog::error("Hyprland IPC: Couldn't copy socket path (6)");
return "";
}
if (connect(SERVERSOCKET, (sockaddr*)&serverAddress, sizeof(serverAddress)) < 0) {
if (connect(SERVERSOCKET, reinterpret_cast<sockaddr*>(&serverAddress), sizeof(serverAddress)) <
0) {
spdlog::error("Hyprland IPC: Couldn't connect to " + socketPath + ". (3)");
return "";
}

View File

@ -4,8 +4,7 @@
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbregistry.h>
#include <util/sanitize_str.hpp>
#include "util/sanitize_str.hpp"
#include "util/string.hpp"
namespace waybar::modules::hyprland {
@ -97,7 +96,6 @@ void Language::initLanguage() {
spdlog::debug("hyprland language initLanguage found {}", layout_.full_name);
dp.emit();
} catch (std::exception& e) {
spdlog::error("hyprland language initLanguage failed with {}", e.what());
}

View File

@ -2,7 +2,7 @@
#include <spdlog/spdlog.h>
#include <util/sanitize_str.hpp>
#include "util/sanitize_str.hpp"
namespace waybar::modules::hyprland {

View File

@ -6,12 +6,11 @@
#include <spdlog/spdlog.h>
#include <algorithm>
#include <regex>
#include <util/sanitize_str.hpp>
#include <vector>
#include "modules/hyprland/backend.hpp"
#include "util/rewrite_string.hpp"
#include "util/sanitize_str.hpp"
namespace waybar::modules::hyprland {

View File

@ -327,7 +327,7 @@ Workspace::Workspace(const Json::Value &workspace_data)
button_.set_relief(Gtk::RELIEF_NONE);
content_.set_center_widget(label_);
button_.add(content_);
};
}
void add_or_remove_class(const Glib::RefPtr<Gtk::StyleContext> &context, bool condition,
const std::string &class_name) {