refactor: rm preprocessor.

* Move patched content to header directly.
This commit is contained in:
2025-01-28 20:48:56 +08:00
parent 96a4ed42d1
commit e0b026e8ff
2 changed files with 0 additions and 17 deletions

View File

@@ -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)

View File

@@ -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)