refactor: rm preprocessor.
* Move patched content to header directly.
This commit is contained in:
@@ -1,14 +0,0 @@
|
||||
"""
|
||||
Preprocessor for _HeaderOutputPredefine.h
|
||||
"""
|
||||
|
||||
|
||||
def process(path_to_file: str):
|
||||
if path_to_file.endswith('_HeaderOutputPredefine.h'):
|
||||
with open(path_to_file, 'r', encoding='utf-8') as file:
|
||||
content = file.read()
|
||||
|
||||
content += '\n#include <winsock2.h>'
|
||||
|
||||
with open(path_to_file, 'w', encoding='utf-8') as wfile:
|
||||
wfile.write(content)
|
||||
@@ -1,7 +1,6 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
import header_preprocessor as HeaderPreProcessor
|
||||
import header_postprocessor as HeaderPostProcessor
|
||||
|
||||
import util.cpp_language as CppUtil
|
||||
@@ -264,8 +263,6 @@ def iterate(args: Options):
|
||||
for file in files:
|
||||
if CppUtil.is_header_file(file):
|
||||
path = os.path.join(root, file)
|
||||
# preprocessing: execution time is before each file.
|
||||
HeaderPreProcessor.process(path)
|
||||
# processing: executed immediately after preprocessing is completed.
|
||||
process(path, args)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user