mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-09-08 05:38:12 +08:00
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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user