DRAW - Add size_t printing support. (#1270)

New overloads of Append() and operator<<() are added to Draw_Interpretor.
New overloads accept size_t type of argument.
This commit is contained in:
Dmitrii Kulikov
2026-05-06 11:59:01 +01:00
committed by GitHub
parent 9aa016011d
commit 654d0b07ca
2 changed files with 15 additions and 0 deletions

View File

@@ -424,6 +424,16 @@ Draw_Interpretor& Draw_Interpretor::Append(const int i)
//=================================================================================================
Draw_Interpretor& Draw_Interpretor::Append(const size_t theResult)
{
char c[100];
Sprintf(c, "%zu", theResult);
Tcl_AppendResult(myInterp, c, (const char*)nullptr);
return *this;
}
//=================================================================================================
Draw_Interpretor& Draw_Interpretor::Append(const double r)
{
char s[100];

View File

@@ -185,6 +185,11 @@ public:
inline Draw_Interpretor& operator<<(const int theResult) { return Append(theResult); }
//! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const size_t theResult);
inline Draw_Interpretor& operator<<(const size_t theResult) { return Append(theResult); }
//! Appends to the result
Standard_EXPORT Draw_Interpretor& Append(const double theResult);