Coding - Revert type definitions for Standard_CString replacements (#1021)

Fix the replacement issue when Standard_CString was replaced to const char* even when it was const.
Now "const Standard_CString" is replaced with "const char* const".
Only places which were before const Standard_CString is replaced.
This commit is contained in:
Pasukhin Dmitry
2026-01-21 10:09:22 +00:00
committed by GitHub
parent aea3d95052
commit 36e781813e
505 changed files with 2708 additions and 2518 deletions
@@ -635,7 +635,7 @@ void BRepTools::Read(TopoDS_Shape& Sh,
//=================================================================================================
bool BRepTools::Write(const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const bool theWithTriangles,
const bool theWithNormals,
const TopTools_FormatVersion theVersion,
@@ -677,7 +677,7 @@ bool BRepTools::Write(const TopoDS_Shape& theShape,
//=================================================================================================
bool BRepTools::Read(TopoDS_Shape& Sh,
const char* File,
const char* const File,
const BRep_Builder& B,
const Message_ProgressRange& theProgress)
{
@@ -321,7 +321,7 @@ public:
//! @param[in] theFile the path to file to output shape into
//! @param theProgress the range of progress indicator to fill in
static bool Write(const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const Message_ProgressRange& theProgress = Message_ProgressRange())
{
return Write(theShape, theFile, true, false, TopTools_FormatVersion_CURRENT, theProgress);
@@ -340,7 +340,7 @@ public:
//! @param theProgress the range of progress indicator to fill in
Standard_EXPORT static bool Write(
const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const bool theWithTriangles,
const bool theWithNormals,
const TopTools_FormatVersion theVersion,
@@ -350,7 +350,7 @@ public:
//! <B> is used to build the shape.
Standard_EXPORT static bool Read(
TopoDS_Shape& Sh,
const char* File,
const char* const File,
const BRep_Builder& B,
const Message_ProgressRange& theProgress = Message_ProgressRange());
@@ -170,7 +170,7 @@ void BinTools::Read(TopoDS_Shape& theShape,
//=================================================================================================
bool BinTools::Write(const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const bool theWithTriangles,
const bool theWithNormals,
const BinTools_FormatVersion theVersion,
@@ -191,7 +191,7 @@ bool BinTools::Write(const TopoDS_Shape& theShape,
//=================================================================================================
bool BinTools::Read(TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const Message_ProgressRange& theRange)
{
const occ::handle<OSD_FileSystem>& aFileSystem = OSD_FileSystem::DefaultFileSystem();
@@ -95,7 +95,7 @@ public:
//! @param[in] theFile the path to file to output shape into
//! @param theRange the range of progress indicator to fill in
static bool Write(const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const Message_ProgressRange& theRange = Message_ProgressRange())
{
return Write(theShape, theFile, true, false, BinTools_FormatVersion_CURRENT, theRange);
@@ -114,7 +114,7 @@ public:
//! @param theRange the range of progress indicator to fill in
Standard_EXPORT static bool Write(
const TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const bool theWithTriangles,
const bool theWithNormals,
const BinTools_FormatVersion theVersion,
@@ -122,7 +122,7 @@ public:
//! Reads a shape from <theFile> and returns it in <theShape>.
Standard_EXPORT static bool Read(TopoDS_Shape& theShape,
const char* theFile,
const char* const theFile,
const Message_ProgressRange& theRange = Message_ProgressRange());
};
@@ -15,7 +15,7 @@
#include <BinTools_ShapeSetBase.hxx>
#include <TopoDS_Shape.hxx>
const char* BinTools_ShapeSetBase::THE_ASCII_VERSIONS[BinTools_FormatVersion_UPPER + 1] = {
const char* const BinTools_ShapeSetBase::THE_ASCII_VERSIONS[BinTools_FormatVersion_UPPER + 1] = {
"",
"Open CASCADE Topology V1 (c)",
"Open CASCADE Topology V2 (c)",
@@ -110,7 +110,7 @@ public:
//! An empty virtual method for redefinition in shape-reader.
Standard_EXPORT virtual void Read(Standard_IStream& /*theStream*/, TopoDS_Shape& /*theShape*/) {}
static const char* THE_ASCII_VERSIONS[BinTools_FormatVersion_UPPER + 1];
static const char* const THE_ASCII_VERSIONS[BinTools_FormatVersion_UPPER + 1];
private:
int myFormatNb;
@@ -33,7 +33,7 @@
#include <cstring>
const char* TopTools_ShapeSet::THE_ASCII_VERSIONS[TopTools_FormatVersion_UPPER + 1] = {
const char* const TopTools_ShapeSet::THE_ASCII_VERSIONS[TopTools_FormatVersion_UPPER + 1] = {
"",
"CASCADE Topology V1, (c) Matra-Datavision",
"CASCADE Topology V2, (c) Matra-Datavision",
@@ -182,7 +182,7 @@ public:
Standard_EXPORT int NbShapes() const;
public:
static const char* THE_ASCII_VERSIONS[TopTools_FormatVersion_VERSION_3 + 1];
static const char* const THE_ASCII_VERSIONS[TopTools_FormatVersion_VERSION_3 + 1];
private:
//! Reads from <IS> a shape and returns it in S.
+1
View File
@@ -2,6 +2,7 @@
set(OCCT_TKG2d_LIST_OF_PACKAGES
Geom2d
LProp
TColGeom2d
Adaptor2d
Geom2dLProp
Geom2dAdaptor
@@ -0,0 +1,6 @@
# Source files for TColGeom2d package
set(OCCT_TColGeom2d_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_TColGeom2d_FILES
)
+1
View File
@@ -1,6 +1,7 @@
# Auto-generated list of packages for TKG3d toolkit
set(OCCT_TKG3d_LIST_OF_PACKAGES
Geom
TColGeom
GeomAdaptor
AdvApprox
GeomLProp
@@ -0,0 +1,6 @@
# Source files for TColGeom package
set(OCCT_TColGeom_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}")
set(OCCT_TColGeom_FILES
)
+2 -2
View File
@@ -63,7 +63,7 @@ const char* TopAbs::ShapeOrientationToString(TopAbs_Orientation theOrientation)
//=================================================================================================
bool TopAbs::ShapeOrientationFromString(const char* theOrientationString,
bool TopAbs::ShapeOrientationFromString(const char* const theOrientationString,
TopAbs_Orientation& theOrientation)
{
TCollection_AsciiString aName(theOrientationString);
@@ -130,6 +130,6 @@ TopAbs_Orientation TopAbs::Complement(const TopAbs_Orientation Ori)
Standard_OStream& TopAbs::Print(const TopAbs_State st, Standard_OStream& s)
{
static const char* TopAbs_Table_PrintState[4] = {"ON", "IN", "OUT", "UNKNOWN"};
static const char* const TopAbs_Table_PrintState[4] = {"ON", "IN", "OUT", "UNKNOWN"};
return (s << TopAbs_Table_PrintState[(int)st]);
}
+2 -2
View File
@@ -146,7 +146,7 @@ public:
//! comparison).
//! @param theOrientationString string identifier
//! @return shape orientation or TopAbs_FORWARD if string identifier is invalid
static TopAbs_Orientation ShapeOrientationFromString(const char* theOrientationString)
static TopAbs_Orientation ShapeOrientationFromString(const char* const theOrientationString)
{
TopAbs_Orientation aType = TopAbs_FORWARD;
ShapeOrientationFromString(theOrientationString, aType);
@@ -158,7 +158,7 @@ public:
//! @param theOrientationString string identifier
//! @param theOrientation detected shape orientation
//! @return TRUE if string identifier is known
Standard_EXPORT static bool ShapeOrientationFromString(const char* theOrientationString,
Standard_EXPORT static bool ShapeOrientationFromString(const char* const theOrientationString,
TopAbs_Orientation& theOrientation);
};