Foundation Classes, Strings - add EmptyString() for Ascii/Extended and use it everywhere (#788)

Introduce TCollection_AsciiString::EmptyString() and TCollection_ExtendedString::EmptyString()
  and update headers.
Replace many local/static empty string instances and default-constructed
  temporaries with the shared EmptyString() reference across ApplicationFramework, DataExchange,
  Visualization and other modules.
Remove several unused local empty-key/static variables and
  adjust default parameters and return paths to use the centralized empty-string accessors.
Add missing #include <TCollection_AsciiString.hxx> to several headers that use/forward TCollection_AsciiString.
This commit is contained in:
Pasukhin Dmitry
2025-11-01 22:39:12 +00:00
committed by GitHub
parent a575926c2d
commit 962a456f9b
34 changed files with 112 additions and 94 deletions
@@ -19,6 +19,7 @@
#include <Message_AttributeStream.hxx>
#include <Message_Messenger.hxx>
#include <Message_Report.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopoDS_Shape.hxx>
@@ -32,7 +33,7 @@ public:
//! Constructor with shape argument
Standard_EXPORT TopoDS_AlertAttribute(
const TopoDS_Shape& theShape,
const TCollection_AsciiString& theName = TCollection_AsciiString());
const TCollection_AsciiString& theName = TCollection_AsciiString::EmptyString());
//! Returns contained shape
const TopoDS_Shape& GetShape() const { return myShape; }