Use empty string instead of NULL if trigger key is not needed

This commit is contained in:
Johannes Marbach 2021-09-09 09:00:33 +02:00
parent 37b2ff53f7
commit 1f179042c9
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@
} }
/* Special characters */ /* Special characters */
#define TRIGGER_SPECIAL_US NULL #define TRIGGER_SPECIAL_US ""
#define KEYS_SPECIAL_US { NULL } #define KEYS_SPECIAL_US { NULL }
#define ATTRIBUTES_SPECIAL_US { 0 } #define ATTRIBUTES_SPECIAL_US { 0 }

View file

@ -121,7 +121,7 @@ if __name__ == '__main__':
for layer in layer_whitelist: for layer in layer_whitelist:
print(f'/* {layer_to_description[layer]} */') print(f'/* {layer_to_description[layer]} */')
if layer not in data['views']: if layer not in data['views']:
print(f'#define TRIGGER_{map_layer(layer).upper()}_{name.upper()} NULL') print(f'#define TRIGGER_{map_layer(layer).upper()}_{name.upper()} ""')
print(f'#define KEYS_{map_layer(layer).upper()}_{name.upper()} ' + '{ NULL }') print(f'#define KEYS_{map_layer(layer).upper()}_{name.upper()} ' + '{ NULL }')
print(f'#define ATTRIBUTES_{map_layer(layer).upper()}_{name.upper()} ' + '{ 0 }\n') print(f'#define ATTRIBUTES_{map_layer(layer).upper()}_{name.upper()} ' + '{ 0 }\n')
continue continue