Browse Source

Volatile keyword not needed for parser.seen

Scott Lahteine 6 years ago
parent
commit
76e90b93b7
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      Marlin/gcode.h

+ 2
- 4
Marlin/gcode.h View File

@@ -131,8 +131,7 @@ public:
131 131
 
132 132
     // Code seen bit was set. If not found, value_ptr is unchanged.
133 133
     // This allows "if (seen('A')||seen('B'))" to use the last-found value.
134
-    // This is volatile because its side-effects are important
135
-    static volatile bool seen(const char c) {
134
+    static bool seen(const char c) {
136 135
       const uint8_t ind = LETTER_OFF(c);
137 136
       if (ind >= COUNT(param)) return false; // Only A-Z
138 137
       const bool b = TEST(codebits[PARAM_IND(ind)], PARAM_BIT(ind));
@@ -148,8 +147,7 @@ public:
148 147
 
149 148
     // Code is found in the string. If not found, value_ptr is unchanged.
150 149
     // This allows "if (seen('A')||seen('B'))" to use the last-found value.
151
-    // This is volatile because its side-effects are important
152
-    static volatile bool seen(const char c) {
150
+    static bool seen(const char c) {
153 151
       const char *p = strchr(command_args, c);
154 152
       const bool b = !!p;
155 153
       if (b) value_ptr = DECIMAL_SIGNED(p[1]) ? &p[1] : (char*)NULL;

Loading…
Cancel
Save