From 4fd28b9911934553e3dde77ff395f4e9494eaa2e Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Mon, 27 Apr 2020 07:00:00 -0400 Subject: cmOutputConverter::GetFortranFormat(): delete const char* overload --- Source/cmCommonTargetGenerator.cxx | 7 ++++--- Source/cmGlobalXCodeGenerator.cxx | 7 +++---- Source/cmLocalVisualStudio7Generator.cxx | 2 +- Source/cmOutputConverter.cxx | 9 --------- Source/cmOutputConverter.h | 1 - 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index 673936c..fbb9429 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -73,11 +73,12 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag( void cmCommonTargetGenerator::AppendFortranFormatFlags( std::string& flags, cmSourceFile const& source) { - cmProp srcfmt = source.GetProperty("Fortran_FORMAT"); + const std::string srcfmt = source.GetSafeProperty("Fortran_FORMAT"); cmOutputConverter::FortranFormat format = - cmOutputConverter::GetFortranFormat(srcfmt ? srcfmt->c_str() : nullptr); + cmOutputConverter::GetFortranFormat(srcfmt); if (format == cmOutputConverter::FortranFormatNone) { - const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT"); + const std::string tgtfmt = + this->GeneratorTarget->GetSafeProperty("Fortran_FORMAT"); format = cmOutputConverter::GetFortranFormat(tgtfmt); } const char* var = nullptr; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 1a753e2..f305246 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -808,9 +808,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( // Add flags from target and source file properties. std::string flags; - cmProp srcfmt = sf->GetProperty("Fortran_FORMAT"); - switch ( - cmOutputConverter::GetFortranFormat(srcfmt ? srcfmt->c_str() : nullptr)) { + const std::string srcfmt = sf->GetSafeProperty("Fortran_FORMAT"); + switch (cmOutputConverter::GetFortranFormat(srcfmt)) { case cmOutputConverter::FortranFormatFixed: flags = "-fixed " + flags; break; @@ -2290,7 +2289,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, // Add Fortran source format attribute if property is set. const char* format = nullptr; - const char* tgtfmt = gtgt->GetProperty("Fortran_FORMAT"); + const std::string tgtfmt = gtgt->GetSafeProperty("Fortran_FORMAT"); switch (cmOutputConverter::GetFortranFormat(tgtfmt)) { case cmOutputConverter::FortranFormatFixed: format = "fixed"; diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 95c798b..8daffa0 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -672,7 +672,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration( if (this->FortranProject) { switch (cmOutputConverter::GetFortranFormat( - target->GetProperty("Fortran_FORMAT"))) { + target->GetSafeProperty("Fortran_FORMAT"))) { case cmOutputConverter::FortranFormatFixed: flags += " -fixed"; break; diff --git a/Source/cmOutputConverter.cxx b/Source/cmOutputConverter.cxx index 68bf3af..dc324cc 100644 --- a/Source/cmOutputConverter.cxx +++ b/Source/cmOutputConverter.cxx @@ -170,15 +170,6 @@ cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( return format; } -cmOutputConverter::FortranFormat cmOutputConverter::GetFortranFormat( - const char* value) -{ - if (!value) { - return FortranFormatNone; - } - return GetFortranFormat(cm::string_view(value)); -} - void cmOutputConverter::SetLinkScriptShell(bool linkScriptShell) { this->LinkScriptShell = linkScriptShell; diff --git a/Source/cmOutputConverter.h b/Source/cmOutputConverter.h index 6583ab5..28582df 100644 --- a/Source/cmOutputConverter.h +++ b/Source/cmOutputConverter.h @@ -94,7 +94,6 @@ public: FortranFormatFree }; static FortranFormat GetFortranFormat(cm::string_view value); - static FortranFormat GetFortranFormat(const char* value); private: cmState* GetState() const; -- cgit v0.12 raph'> * [3.13] gh-118760: Fix errors in calling Tkinter bindings on Windows (GH-11878...Miss Islington (bot)2024-05-151-0/+3 * gh-66410: Do not stringify arguments of Tkinter callback (GH-98592)Serhiy Storchaka2024-05-071-2/+5 * gh-71592: Add ability to trace Tcl commands executed by Tkinter (GH-118291)Serhiy Storchaka2024-05-061-4/+15 * gh-118271: Support more options for reading/writing images in Tkinter (GH-118...Serhiy Storchaka2024-05-061-11/+111 * gh-118225: Support more options for copying images in Tkinter (GH-118228)Serhiy Storchaka2024-05-061-16/+95 * bpo-32839: Add the after_info() method for Tkinter widgets (GH-5664)Cheryl Sabella2024-04-261-0/+15 * gh-116484: Fix collisions between Checkbutton and ttk.Checkbutton default nam...Serhiy Storchaka2024-03-161-1/+6 * gh-97928: Partially restore the behavior of tkinter.Text.count() by default (...Serhiy Storchaka2024-02-111-8/+15 * gh-43457: Tkinter: fix design flaws in wm_attributes() (GH-111404)Serhiy Storchaka2024-02-052-20/+33 * gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds "fun...Serhiy Storchaka2024-02-041-11/+15 * gh-110345: show Tcl/Tk patchlevel in `tkinter._test()` (GH-110350)Christopher Chavez2024-01-181-1/+1 * gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900)Serhiy Storchaka2024-01-101-0/+2 * gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" (GH-1...Serhiy Storchaka2023-12-061-4/+18 * gh-68166: Add support of "vsapi" in ttk.Style.element_create() (GH-111393)Serhiy Storchaka2023-11-271-24/+31 * gh-111531: Tkinter: fix reference leaks in bind_class() and bind_all() (GH-11...Serhiy Storchaka2023-10-311-2/+2 * gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)Serhiy Storchaka2023-10-241-13/+16 * gh-72684: Tkinter: provide interface for "tk busy" subcommands (GH-107684)Serhiy Storchaka2023-08-191-0/+79 * gh-100814: Fix exception for invalid callable value of Tkinter image option (...Serhiy Storchaka2023-08-071-4/+0 * gh-75552: Remove deprecated tkinter.tix module (GH-104902)Zachary Ware2023-05-271-1948/+0 * gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)Serhiy Storchaka2023-05-221-1/+1 * gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)Christopher Chavez2023-04-241-2/+1 * gh-102799: use exception instance instead of sys.exc_info() (#102885)Irit Katriel2023-03-311-3/+2 * gh-102778: Add sys.last_exc, deprecate sys.last_type, sys.last_value,sys.last...Irit Katriel2023-03-181-0/+1 * gh-57762: fix misleading tkinter.Tk docstring (#98837)Shantanu2022-12-221-1/+1 * gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-...Serhiy Storchaka2022-10-191-1/+1 * gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Serhiy Storchaka2022-09-273-3/+13 * gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)Victor Stinner2022-06-2220-6771/+0 * gh-84623: Remove unused imports (#94132)Victor Stinner2022-06-222-2/+0 * gh-84623: Remove unused imports in stdlib (#93773)Victor Stinner2022-06-131-1/+1 * bpo-13553: Document tkinter.Tk args (#4786)Cheryl Sabella2022-05-101-4/+4 * gh-91827: Add method info_pathlevel() in tkinter (GH-91829)Serhiy Storchaka2022-05-064-10/+59 * bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)Serhiy Storchaka2022-03-17