From db45682ec3950a75006079b408d27766f6cb966a Mon Sep 17 00:00:00 2001 From: cxl Date: Thu, 10 Nov 2016 08:12:26 +0000 Subject: [PATCH] ide: 'init' code removed git-svn-id: svn://ultimatepp.org/upp/trunk@10406 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Defs.h | 2 +- uppsrc/Core/src.tpp/AppEnv$en-us.tpp | 2 -- uppsrc/ide/Export.cpp | 1 - uppsrc/ide/UppWspc.cpp | 23 ----------------------- 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/uppsrc/Core/Defs.h b/uppsrc/Core/Defs.h index da0cc85b8..0f4531dee 100644 --- a/uppsrc/Core/Defs.h +++ b/uppsrc/Core/Defs.h @@ -229,7 +229,7 @@ template inline const T& max(const T& a, const T& b, const T& c) template inline const T& max(const T& a, const T& b, const T& c, const T& d) { return max(max(a, b), max(c, d)); } -template +template // deprecated name, use clamp inline T minmax(T x, T _min, T _max) { return min(max(x, _min), _max); } template diff --git a/uppsrc/Core/src.tpp/AppEnv$en-us.tpp b/uppsrc/Core/src.tpp/AppEnv$en-us.tpp index 3025f1140..5e1c4864e 100644 --- a/uppsrc/Core/src.tpp/AppEnv$en-us.tpp +++ b/uppsrc/Core/src.tpp/AppEnv$en-us.tpp @@ -197,8 +197,6 @@ lass]_[*@4 T]>_[@(0.0.255) const]_[*@4 T][@(0.0.255) `&]_[* max]([@(0.0.255) con [s2;%% Returns the greatest of all arguments.&] [s3;%% &] [s4; &] -[s5;:minmax`(T`,T`,T`): [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T]>_[*@4 T]_[* minmax]([*@4 T -]_[*@3 x], [*@4 T]_[*@3 `_min], [*@4 T]_[*@3 `_max])&] [s5;:clamp`(T`,T`,T`): [@(0.0.255) template]_<[@(0.0.255) class]_[*@4 T]>_[*@4 T]_[* clamp]([*@4 T ]_[*@3 x], [*@4 T]_[*@3 `_min], [*@4 T]_[*@3 `_max])&] [s2;%% Returns [%-*@3 x] if it is between [%-*@3 `_min] and [%-*@3 `_max].&] diff --git a/uppsrc/ide/Export.cpp b/uppsrc/ide/Export.cpp index 7c0fe667a..1488cebad 100644 --- a/uppsrc/ide/Export.cpp +++ b/uppsrc/ide/Export.cpp @@ -27,7 +27,6 @@ void Ide::ExportProject(const String& ep, bool all, bool gui, bool deletedir) used.FindAdd(SourcePath(pn, f.depends[q].text)); } } - used.FindAdd(SourcePath(pn, "init")); } if(FileExists(ep)) { if(gui && !PromptYesNo(DeQtf(ep) + " is existing file.&" diff --git a/uppsrc/ide/UppWspc.cpp b/uppsrc/ide/UppWspc.cpp index 192473577..118a9f0b5 100644 --- a/uppsrc/ide/UppWspc.cpp +++ b/uppsrc/ide/UppWspc.cpp @@ -161,29 +161,6 @@ void WorkspaceWork::SavePackage() b.data = String::GetVoid(); } actual.Save(pp); -#if 0 // nobody is using 'init'. to be replaced by "add by include" method - String init; - String mnm = Filter('_' + actualpackage + "_icpp_init_stub", CharFilterMacro); - init << "#ifndef " << mnm << "\r\n"; - init << "#define " << mnm << "\r\n"; - Index once; - for(int i = 0; i < actual.uses.GetCount(); i++) { - String u = actual.uses[i].text; - if(once.Find(u) < 0) { - once.Add(u); - init << "#include \"" << actual.uses[i].text << "/init\"\r\n"; - } - } - for(int i = 0; i < actual.GetCount(); i++) { - String f = actual[i]; - if(ToLower(GetFileExt(f)) == ".icpp") - init << "#define BLITZ_INDEX__ " << "F" << MD5String(f) << "\r\n" - << "#include \"" << f << "\"\r\n" - << "#undef BLITZ_INDEX__\r\n"; - } - init << "#endif\r\n"; - SaveChangedFile(SourcePath(actualpackage, "init"), init); -#endif } void WorkspaceWork::RestoreBackup()