File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,10 @@ func PreprocessSketchWithCtags(ctx *types.Context) error {
57
57
if src , err := targetFilePath .ReadFile (); err != nil {
58
58
return err
59
59
} else {
60
- ctx .SketchSourceAfterCppPreprocessing = bldr .FilterSketchSource (ctx .Sketch , bytes .NewReader (src ), false )
61
- }
62
-
63
- if err := targetFilePath .WriteFile ([]byte (ctx .SketchSourceAfterCppPreprocessing )); err != nil {
64
- return err
60
+ filteredSource := bldr .FilterSketchSource (ctx .Sketch , bytes .NewReader (src ), false )
61
+ if err := targetFilePath .WriteFile ([]byte (filteredSource )); err != nil {
62
+ return err
63
+ }
65
64
}
66
65
67
66
sketchCpp := ctx .SketchBuildPath .Join (fmt .Sprintf ("%s.cpp" , ctx .Sketch .MainFile .Base ()))
Original file line number Diff line number Diff line change @@ -107,8 +107,6 @@ type Context struct {
107
107
// Arduino sketch (.ino) to C++ (.cpp) conversion steps:
108
108
// 1. Concatenate *.ino files into a single merged source file -> SketchSourceMerged
109
109
SketchSourceMerged string
110
- // 2. Run a pass of C++ preprocessor to remove macro definitions and ifdef-ed code -> SketchSourceAfterCppPreprocessing
111
- SketchSourceAfterCppPreprocessing string
112
110
// 3. Do the Arduino preprocessing of the sketch (add missing prototypes) -> SketchSourceAfterArduinoPreprocessing
113
111
SketchSourceAfterArduinoPreprocessing string
114
112
You can’t perform that action at this time.
0 commit comments