mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:47:34 +00:00
Everywhere: "file name" => "filename"
This commit is contained in:
parent
def1f1444a
commit
7ae7170d61
59 changed files with 181 additions and 181 deletions
|
@ -20,7 +20,7 @@ class CharacterMap {
|
|||
|
||||
public:
|
||||
CharacterMap(const String& map_name, const CharacterMapData& map_data);
|
||||
static Optional<CharacterMap> load_from_file(const String& file_name);
|
||||
static Optional<CharacterMap> load_from_file(const String& filename);
|
||||
|
||||
#ifndef KERNEL
|
||||
int set_system_map();
|
||||
|
|
|
@ -11,13 +11,13 @@
|
|||
|
||||
namespace Keyboard {
|
||||
|
||||
Optional<CharacterMapData> CharacterMapFile::load_from_file(const String& file_name)
|
||||
Optional<CharacterMapData> CharacterMapFile::load_from_file(const String& filename)
|
||||
{
|
||||
auto path = file_name;
|
||||
auto path = filename;
|
||||
if (!path.ends_with(".json")) {
|
||||
StringBuilder full_path;
|
||||
full_path.append("/res/keymaps/");
|
||||
full_path.append(file_name);
|
||||
full_path.append(filename);
|
||||
full_path.append(".json");
|
||||
path = full_path.to_string();
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ Optional<CharacterMapData> CharacterMapFile::load_from_file(const String& file_n
|
|||
auto file = Core::File::construct(path);
|
||||
file->open(Core::IODevice::ReadOnly);
|
||||
if (!file->is_open()) {
|
||||
dbgln("Failed to open {}: {}", file_name, file->error_string());
|
||||
dbgln("Failed to open {}: {}", filename, file->error_string());
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Keyboard {
|
|||
class CharacterMapFile {
|
||||
|
||||
public:
|
||||
static Optional<CharacterMapData> load_from_file(const String& file_name);
|
||||
static Optional<CharacterMapData> load_from_file(const String& filename);
|
||||
|
||||
private:
|
||||
static Vector<u32> read_map(const JsonObject& json, const String& name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue