ladybird/Userland/Libraries/LibKeyboard/CharacterMapFile.h
RasmusNylander 4e65c4dae4 LibKeyboard: Change some Optional<T> returns to ErrorOr<T>
Makes CharacterMapFile::load_from_file and CharacterMap::load_from_file
return ErrorOr instead of Optional. This makes them a little nicer to
use and a little easier to read, as they seem to have been approximating
this.
2022-01-06 17:54:03 +01:00

24 lines
428 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* Copyright (c) 2020, Hüseyin Aslıtürk <asliturk@hotmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/JsonObject.h>
#include <LibKeyboard/CharacterMapData.h>
namespace Keyboard {
class CharacterMapFile {
public:
static ErrorOr<CharacterMapData> load_from_file(const String& filename);
private:
static Vector<u32> read_map(const JsonObject& json, const String& name);
};
}