From 4fc761f17154acc2cd92ab96a63952a250a26ab1 Mon Sep 17 00:00:00 2001 From: Miller Cy Chan Date: Thu, 26 Oct 2023 14:54:35 +0800 Subject: [PATCH] Update nQuantCpp.cpp --- nQuantCpp/nQuantCpp.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nQuantCpp/nQuantCpp.cpp b/nQuantCpp/nQuantCpp.cpp index f24f392..ffeff0f 100644 --- a/nQuantCpp/nQuantCpp.cpp +++ b/nQuantCpp/nQuantCpp.cpp @@ -296,24 +296,22 @@ void OutputImages(const fs::path& sourceDir, wstring& targetDir, const UINT& nMa tcout << "Completed in " << dur << " secs." << endl; } -#ifdef _WIN32 -int wmain(int argc, wchar_t** argv) +int _tmain(int argc, _TCHAR** argv) { +#ifdef _WIN32 _setmode(_fileno(stdout), _O_U16TEXT); #else -int main(int argc, char** argv) -{ ios::sync_with_stdio(false); // Linux gcc tcout.imbue(locale("")); setlocale(LC_CTYPE, ""); #endif - if (argc <= 1) { #ifndef _DEBUG + if (argc <= 1) { PrintUsage(); return 0; -#endif } +#endif auto szDir = fs::current_path().wstring();