Skip to content

Commit 82d55b4

Browse files
committed
.hpp support in autocompletion (untested)
added hpp extension into “doAutocomplete” function for future compatibility
1 parent a5d4a0e commit 82d55b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,7 @@ private function doAutocomplete($ARDUINO_CORES_DIR, $compiler_config, $compile_d
11341134

11351135
$ext = pathinfo($file, PATHINFO_EXTENSION);
11361136
if (!in_array($ext, array("ino", "c", "cpp", "h", "hpp")))
1137-
return array("success" => false, "message" => "Sorry, autocompletion is only supported for .ino, .c, .cpp or .h files.");
1137+
return array("success" => false, "message" => "Sorry, autocompletion is only supported for .ino, .c, .cpp, .h or .hpp files.");
11381138
if ($ext == "ino")
11391139
{
11401140
$ext = "cpp";
@@ -1149,7 +1149,7 @@ private function doAutocomplete($ARDUINO_CORES_DIR, $compiler_config, $compile_d
11491149
$json_array = array("file" => $compiler_config["autocmpfile"], "row" => $compiler_config["autocmprow"], "column" => $compiler_config["autocmpcol"], "prefix" => $compiler_config["autocmpprefix"], "command" => $commandline);
11501150

11511151
}
1152-
elseif ($ext == "cpp" || $ext == "h")
1152+
elseif ($ext == "cpp" || $ext == "h" || $ext == "hpp" )
11531153
{
11541154
$commandline = "$CPP $CPPFLAGS $core_includes $target_arch -MMD $include_directories -c -o $filename.o $filename.$ext 2>&1";
11551155
$json_array = array("file" => $compiler_config["autocmpfile"], "row" => $compiler_config["autocmprow"], "column" => $compiler_config["autocmpcol"], "prefix" => $compiler_config["autocmpprefix"], "command" => $commandline);

0 commit comments

Comments
 (0)