mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
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:
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user