From 4ab7087d6bc07199adab4a89d69b4a2afa9c33ca Mon Sep 17 00:00:00 2001 From: Mirek Fidler Date: Tue, 15 Oct 2024 12:34:34 +0200 Subject: [PATCH] ide: Fixed some MSBT warnings --- uppsrc/CtrlCore/Ctrl.cpp | 2 +- uppsrc/ide/Builders/AndroidBuilderUtils.cpp | 2 +- uppsrc/ide/Builders/CCJ.cpp | 2 +- uppsrc/ide/Builders/MakeFile.cpp | 4 ++-- uppsrc/ide/Core/Assembly.cpp | 2 +- uppsrc/ide/Core/Ide.cpp | 2 +- uppsrc/ide/Core/Package.cpp | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/uppsrc/CtrlCore/Ctrl.cpp b/uppsrc/CtrlCore/Ctrl.cpp index a2a27c457..f33c87dc8 100644 --- a/uppsrc/CtrlCore/Ctrl.cpp +++ b/uppsrc/CtrlCore/Ctrl.cpp @@ -440,7 +440,7 @@ String Ctrl::GetDesc() const String Name(const Ctrl *ctrl) { - return ctrl ? ctrl->Name() : "NULL"; + return ctrl ? ctrl->Name() : String("NULL"); } String Desc(const Ctrl *ctrl) diff --git a/uppsrc/ide/Builders/AndroidBuilderUtils.cpp b/uppsrc/ide/Builders/AndroidBuilderUtils.cpp index 734de46d8..54ddd9846 100644 --- a/uppsrc/ide/Builders/AndroidBuilderUtils.cpp +++ b/uppsrc/ide/Builders/AndroidBuilderUtils.cpp @@ -18,7 +18,7 @@ String AndroidBuilderUtils::GetAssemblyDir(const String& packageDir, const Strin if (pos >= 0 && pos < assemblyDir.GetCount()) assemblyDir.Trim(pos); - return assemblyDir != packageDir ? assemblyDir : ""; + return assemblyDir != packageDir ? assemblyDir : String(); } } diff --git a/uppsrc/ide/Builders/CCJ.cpp b/uppsrc/ide/Builders/CCJ.cpp index e75fc0cda..a2e1535de 100644 --- a/uppsrc/ide/Builders/CCJ.cpp +++ b/uppsrc/ide/Builders/CCJ.cpp @@ -174,7 +174,7 @@ void MakeBuild::SaveCCJ(const String& fn, bool exporting) String makefile; Vector uppdirs = GetUppDirs(); - String uppout = exporting ? GetUppOut() : ".cache/upp.out"; + String uppout = exporting ? GetUppOut() : String(".cache/upp.out"); Index allconfig = PackageConfig(GetIdeWorkspace(), 0, bm, mainconfigparam, host, *b); bool win32 = allconfig.Find("WIN32") >= 0; diff --git a/uppsrc/ide/Builders/MakeFile.cpp b/uppsrc/ide/Builders/MakeFile.cpp index 679dc4349..9883494df 100644 --- a/uppsrc/ide/Builders/MakeFile.cpp +++ b/uppsrc/ide/Builders/MakeFile.cpp @@ -283,7 +283,7 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting) String makefile; Vector uppdirs = GetUppDirs(); - String uppout = exporting ? GetUppOut() : ".cache/upp.out"; + String uppout = exporting ? GetUppOut() : String(".cache/upp.out"); String inclist; Index allconfig = PackageConfig(GetIdeWorkspace(), 0, bm, mainconfigparam, host, *b); @@ -320,7 +320,7 @@ void MakeBuild::SaveMakeFile(const String& fn, bool exporting) inclist << " -I$(UPPOUT)"; // build_info.h is created there makefile << "\n" - "UPPOUT = " << (exporting ? "_out/" : GetMakePath(AdjustMakePath(AppendFileName(uppout, "")), win32)) << "\n" + "UPPOUT = " << (exporting ? "_out/" : GetMakePath(AdjustMakePath(AppendFileName(uppout, String())), win32)) << "\n" "CINC = " << inclist << "\n" "Macro = "; diff --git a/uppsrc/ide/Core/Assembly.cpp b/uppsrc/ide/Core/Assembly.cpp index d40c0d2ea..3e3e87180 100644 --- a/uppsrc/ide/Core/Assembly.cpp +++ b/uppsrc/ide/Core/Assembly.cpp @@ -124,7 +124,7 @@ String Nest::PackagePath0(const String& name) if(FileExists(p)) return p; } return d.GetCount() ? NormalizePath(AppendFileName(AppendFileName(d[0], uppfile), - GetFileName(uppfile)) + ".upp") : ""; + GetFileName(uppfile)) + ".upp") : String(); } String Nest::PackagePath(const String& name) diff --git a/uppsrc/ide/Core/Ide.cpp b/uppsrc/ide/Core/Ide.cpp index 263bc87be..a045ed25b 100644 --- a/uppsrc/ide/Core/Ide.cpp +++ b/uppsrc/ide/Core/Ide.cpp @@ -63,7 +63,7 @@ VectorMap GetMethodVars(const String& method) String GetMethodPath(const String& method) { - return the_ide ? the_ide->GetMethodName(method) : ""; + return the_ide ? the_ide->GetMethodName(method) : String(); } bool IdeIsBuilding() diff --git a/uppsrc/ide/Core/Package.cpp b/uppsrc/ide/Core/Package.cpp index 0049f37a4..a4c409039 100644 --- a/uppsrc/ide/Core/Package.cpp +++ b/uppsrc/ide/Core/Package.cpp @@ -448,7 +448,7 @@ String IdeCharsetName(byte charset) { void PutSpellCheckComments(StringStream& out, int sc) { if(!IsNull(sc)) - out << " spellcheck_comments " << AsCString(sc ? LNGAsText(sc) : ""); + out << " spellcheck_comments " << AsCString(sc ? LNGAsText(sc) : String()); } bool Package::Save(const char *path) const {