From eb7db0310fd45c20e15bf6f004c36bf3907d20c5 Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 23 Apr 2026 14:57:22 +0800 Subject: [PATCH] =?UTF-8?q?Code=20Clean=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GitVer/GitVer.cpp | 11 +++-------- GitVer/GitVer_cli.cpp | 2 +- GitVer/GitVer_common.cpp | 2 +- GitVer/GitVer_nuitka.cpp | 2 +- GitVer/GitVer_process.cpp | 2 +- GitVer/GitVer_rewrite.cpp | 2 +- GitVer/GitVer_tag.cpp | 2 +- GitVer/GitVer_version.cpp | 2 +- GitVer/pch.cpp | 2 +- GitVer/resource.h | 2 +- 10 files changed, 12 insertions(+), 17 deletions(-) diff --git a/GitVer/GitVer.cpp b/GitVer/GitVer.cpp index 88d5157..6ee4f12 100644 --- a/GitVer/GitVer.cpp +++ b/GitVer/GitVer.cpp @@ -17,7 +17,6 @@ #define new DEBUG_NEW #endif - // 唯一的应用程序对象 CWinApp theApp; @@ -548,7 +547,6 @@ void GetDirInfo() SetCurrentDirectory(g_szCurModuleDir); } - /// /// 处理设置版本命令。 /// @@ -606,7 +604,6 @@ int HandleSetVerCommand(int argc, TCHAR* argv[]) return RewriteSetVerByProjectType(lpRepoPath, strProductVersion, strFileVersion); } - /// /// /// 准备C++重写内容。 @@ -671,7 +668,6 @@ void PrepareCppRewriteContent(const CString& strCommitId, int nPEType, CString& #endif } - /// /// 准备C#重写内容。 /// @@ -710,7 +706,6 @@ void PrepareCSharpRewriteContent(const CString& strCommitId, CString& strResFile vtNewContent.push_back(ToAnsiString(szValue)); } - /// /// 处理重写命令。 /// @@ -797,7 +792,7 @@ int HandleRewriteCommand(int argc, TCHAR* argv[]) int main(int argc, TCHAR* argv[], TCHAR* envp[]) { - int nRetCode = 0; + int nRetCode = 0; // 添加图标; HWND hwnd = GetForegroundWindow(); @@ -868,5 +863,5 @@ int main(int argc, TCHAR* argv[], TCHAR* envp[]) return 3; } - return nRetCode; -} + return nRetCode; +} \ No newline at end of file diff --git a/GitVer/GitVer_cli.cpp b/GitVer/GitVer_cli.cpp index 5f700ee..f49e9f1 100644 --- a/GitVer/GitVer_cli.cpp +++ b/GitVer/GitVer_cli.cpp @@ -86,4 +86,4 @@ int ParseRewriteOptions(int argc, TCHAR* argv[], int& nPEType, BOOL& bForceRewri } return 0; -} +} \ No newline at end of file diff --git a/GitVer/GitVer_common.cpp b/GitVer/GitVer_common.cpp index 00829bf..cdd288e 100644 --- a/GitVer/GitVer_common.cpp +++ b/GitVer/GitVer_common.cpp @@ -92,4 +92,4 @@ BOOL IsLikelyPathArg(LPCTSTR lpArg) || strArg.Find(_T('/')) >= 0 || strArg.Find(_T(':')) >= 0 || strArg.Left(1) == _T("."); -} +} \ No newline at end of file diff --git a/GitVer/GitVer_nuitka.cpp b/GitVer/GitVer_nuitka.cpp index d1e5e16..c36bdc3 100644 --- a/GitVer/GitVer_nuitka.cpp +++ b/GitVer/GitVer_nuitka.cpp @@ -187,4 +187,4 @@ int HandleNuitkaPydBuildCommand(int argc, TCHAR* argv[]) 26, 27, 28); -} +} \ No newline at end of file diff --git a/GitVer/GitVer_process.cpp b/GitVer/GitVer_process.cpp index c888e17..9bd6728 100644 --- a/GitVer/GitVer_process.cpp +++ b/GitVer/GitVer_process.cpp @@ -167,4 +167,4 @@ CString StartProcess(LPCTSTR program, LPCTSTR args, LPCTSTR lpCurrentDirectory) strValue.GetString()); return strValue; -} +} \ No newline at end of file diff --git a/GitVer/GitVer_rewrite.cpp b/GitVer/GitVer_rewrite.cpp index 60867fd..45e66ab 100644 --- a/GitVer/GitVer_rewrite.cpp +++ b/GitVer/GitVer_rewrite.cpp @@ -439,4 +439,4 @@ int RewriteSetVerByProjectType(LPCTSTR lpRepoPath, const CString& strProductVers _tprintf(_T(": ֵ֧Ŀ͡\n")); return 15; -} +} \ No newline at end of file diff --git a/GitVer/GitVer_tag.cpp b/GitVer/GitVer_tag.cpp index b8f339e..45f9db5 100644 --- a/GitVer/GitVer_tag.cpp +++ b/GitVer/GitVer_tag.cpp @@ -232,4 +232,4 @@ int HandleCreateTagInteractive() _tprintf(_T("ɹ: ǩ %s\n"), strNewTag.GetString()); return 0; -} +} \ No newline at end of file diff --git a/GitVer/GitVer_version.cpp b/GitVer/GitVer_version.cpp index 0be54bc..1351d75 100644 --- a/GitVer/GitVer_version.cpp +++ b/GitVer/GitVer_version.cpp @@ -241,4 +241,4 @@ int BuildVersionsFromRepo( strFileVersion.Format(_T("%u.%u.%u.%u"), nPid, nYY, nMMDD, nId); _tprintf(_T("汾: ProductVersion=%s FileVersion=%s\n"), strProductVersion.GetString(), strFileVersion.GetString()); return 0; -} +} \ No newline at end of file diff --git a/GitVer/pch.cpp b/GitVer/pch.cpp index b6fb8f4..781d282 100644 --- a/GitVer/pch.cpp +++ b/GitVer/pch.cpp @@ -2,4 +2,4 @@ #include "pch.h" -// 当使用预编译的头时,需要使用此源文件,编译才能成功。 +// 当使用预编译的头时,需要使用此源文件,编译才能成功。 \ No newline at end of file diff --git a/GitVer/resource.h b/GitVer/resource.h index 037819f..d83cd2b 100644 --- a/GitVer/resource.h +++ b/GitVer/resource.h @@ -7,7 +7,7 @@ #define IDS_APP_TITLE 103 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 102