Browse Source

Remove unnecessary parenthesis from code examples

Michael Alexsander 5 years ago
parent
commit
e1a9a3328d
2 changed files with 3 additions and 3 deletions
  1. 2 2
      doc/classes/@GlobalScope.xml
  2. 1 1
      doc/classes/Directory.xml

+ 2 - 2
doc/classes/@GlobalScope.xml

@@ -1167,10 +1167,10 @@
 			Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
 			Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.:
 			[codeblock]
 			[codeblock]
 			var err = method_that_returns_error()
 			var err = method_that_returns_error()
-			if (err != OK):
+			if err != OK:
 			    print("Failure!)
 			    print("Failure!)
 			# Or, equivalent:
 			# Or, equivalent:
-			if (err):
+			if err:
 			    print("Still failing!)
 			    print("Still failing!)
 			[/codeblock]
 			[/codeblock]
 		</constant>
 		</constant>

+ 1 - 1
doc/classes/Directory.xml

@@ -13,7 +13,7 @@
 		    if dir.open(path) == OK:
 		    if dir.open(path) == OK:
 		        dir.list_dir_begin()
 		        dir.list_dir_begin()
 		        var file_name = dir.get_next()
 		        var file_name = dir.get_next()
-		        while (file_name != ""):
+		        while file_name != "":
 		            if dir.current_is_dir():
 		            if dir.current_is_dir():
 		                print("Found directory: " + file_name)
 		                print("Found directory: " + file_name)
 		            else:
 		            else: