Set some variables to static
This commit is contained in:
parent
ae1ab03275
commit
cd75b77695
@ -232,9 +232,9 @@ namespace service {
|
|||||||
// start reading lines from input one by one
|
// start reading lines from input one by one
|
||||||
static const int MAX_LINE_LENGTH = 256;
|
static const int MAX_LINE_LENGTH = 256;
|
||||||
static char data[MAX_LINE_LENGTH];
|
static char data[MAX_LINE_LENGTH];
|
||||||
|
static cmatch matches;
|
||||||
bool flag_begin = false;
|
bool flag_begin = false;
|
||||||
while (fgets_unlocked(data, MAX_LINE_LENGTH, stdin) != NULL) {
|
while (fgets_unlocked(data, MAX_LINE_LENGTH, stdin) != NULL) {
|
||||||
cmatch matches;
|
|
||||||
if (!flag_begin) {
|
if (!flag_begin) {
|
||||||
if (regex_match(data, matches, gesture_begin)) {
|
if (regex_match(data, matches, gesture_begin)) {
|
||||||
swipe.device = matches[1];
|
swipe.device = matches[1];
|
||||||
@ -293,7 +293,7 @@ namespace service {
|
|||||||
}
|
}
|
||||||
// toggle automatically start application on startup
|
// toggle automatically start application on startup
|
||||||
void autostart() {
|
void autostart() {
|
||||||
string path = autostart_filename();
|
cstr path = autostart_filename();
|
||||||
if (ifstream(path.data()).good()) {
|
if (ifstream(path.data()).good()) {
|
||||||
// file found, delete it
|
// file found, delete it
|
||||||
if (remove(path.data()) != 0)
|
if (remove(path.data()) != 0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user