From 6aa9f52c1c8c92f1e3f07bd72bfd0473c1461b37 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 27 Apr 2019 04:34:52 +0300 Subject: [PATCH] SplitSource: remove unneded for Td destructor headers. GitOrigin-RevId: ddff5fc28b46db6b757fc9c638614bd73d1c4ea9 --- SplitSource.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SplitSource.php b/SplitSource.php index 403c2c46..dc4ff85c 100644 --- a/SplitSource.php +++ b/SplitSource.php @@ -293,6 +293,17 @@ function split_file($file, $chunks, $undo) { $new_content = str_replace($include_name, '', $new_content); } } + } else { + $new_content = preg_replace_callback( + '|#include "[a-z_A-Z/0-9.]*"|', + function ($matches) { + if (strpos($matches[0], "Manager") !== false || strpos($matches[0], "HashtagHints") !== false || strpos($matches[0], "Td.h") !== false) { + return $matches[0]; + } + return ''; + }, + $new_content + ); } if (!file_exists($new_files[$n]) || file_get_contents($new_files[$n]) !== $new_content) {