Code quality, safety, stability, and cleanups.

- Replace header include guards with `#pragma once` and perform minor optimizations.
- Replaced traditional include guards with `#pragma once` for simplicity and to reduce boilerplate in all headers.
- Improved CLI line number handling with clamping and error messaging.
- Enhanced `chdir` error handling for macOS GUI builds.
- Removed redundant logic for GUI builds.
- Adjusted font constructor and registry to handle `const` data pointers consistently.
This commit is contained in:
2025-12-03 14:02:54 -08:00
parent 389dcf9cc7
commit 45b2b88623
29 changed files with 100 additions and 188 deletions

View File

@@ -1,8 +1,7 @@
/*
* Command.h - command model and registry for editor actions
*/
#ifndef KTE_COMMAND_H
#define KTE_COMMAND_H
#pragma once
#include <functional>
#include <string>
@@ -155,6 +154,4 @@ void InstallDefaultCommands();
// Returns true if the command executed successfully.
bool Execute(Editor &ed, CommandId id, const std::string &arg = std::string(), int count = 0);
bool Execute(Editor &ed, const std::string &name, const std::string &arg = std::string(), int count = 0);
#endif // KTE_COMMAND_H
bool Execute(Editor &ed, const std::string &name, const std::string &arg = std::string(), int count = 0);