Apply clang-format
This commit is contained in:
parent
b83b01c0ca
commit
cf96a92e09
@ -54,7 +54,7 @@ int parse_config(void *config, const char section[], const char name[],
|
|||||||
/**
|
/**
|
||||||
* The main driver program.
|
* The main driver program.
|
||||||
*/
|
*/
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace comfortable_swipe;
|
using namespace comfortable_swipe;
|
||||||
// unsync stdio for faster IO
|
// unsync stdio for faster IO
|
||||||
@ -90,7 +90,10 @@ int main(int argc, char* argv[]) {
|
|||||||
commands[i] = config[gesture_swipe_xdokey::command_name[i]];
|
commands[i] = config[gesture_swipe_xdokey::command_name[i]];
|
||||||
// correctly parse threshold as float
|
// correctly parse threshold as float
|
||||||
float threshold = 0.0f;
|
float threshold = 0.0f;
|
||||||
try { threshold = stof(config["threshold"]); } catch(std::invalid_argument) { }
|
try {
|
||||||
|
threshold = stof(config["threshold"]);
|
||||||
|
} catch (std::invalid_argument) {
|
||||||
|
}
|
||||||
// create swipe handler
|
// create swipe handler
|
||||||
gesture_swipe_xdokey keyswipe(commands, threshold);
|
gesture_swipe_xdokey keyswipe(commands, threshold);
|
||||||
// initialize mouse hold gesture handler
|
// initialize mouse hold gesture handler
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user