paint: cleanup
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
void operator_register(string_t *name, void (*call)(void)) {
|
||||
void operator_register(char *name, void (*call)(void)) {
|
||||
any_map_set(operator_ops, name, call);
|
||||
}
|
||||
|
||||
void operator_run(string_t *name) {
|
||||
if (any_map_get(operator_ops, name) != null) {
|
||||
void operator_run(char *name) {
|
||||
if (any_map_get(operator_ops, name) != NULL) {
|
||||
void (*cb)(void) = any_map_get(operator_ops, name);
|
||||
cb();
|
||||
}
|
||||
@@ -13,7 +13,7 @@ void operator_update() {
|
||||
if (mouse_started_any() || keyboard_started_any()) {
|
||||
string_t_array_t *keys = map_keys(config_keymap);
|
||||
for (i32 i = 0; i < keys->length; ++i) {
|
||||
string_t *op = keys->buffer[i];
|
||||
char *op = keys->buffer[i];
|
||||
if (operator_shortcut(any_map_get(config_keymap, op), SHORTCUT_TYPE_STARTED)) {
|
||||
operator_run(op);
|
||||
}
|
||||
@@ -21,7 +21,7 @@ void operator_update() {
|
||||
}
|
||||
}
|
||||
|
||||
bool operator_shortcut(string_t *s, shortcut_type_t type) {
|
||||
bool operator_shortcut(char *s, shortcut_type_t type) {
|
||||
if (string_equals(s, "")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user