mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0025266: Debug statements in the source are getting flushed on to the console
Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
This commit is contained in:
@@ -179,9 +179,11 @@ Standard_Real UnitsAPI::CurrentToLS(const Standard_Real aData,
|
||||
aValue = Units::ToSI(aData,current.ToCString());
|
||||
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(aQuantity,aValue);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout <<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -201,9 +203,11 @@ Standard_Real UnitsAPI::CurrentToSI(const Standard_Real aData,
|
||||
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
|
||||
aValue = Units::ToSI(aData,current.ToCString());
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -224,9 +228,11 @@ Standard_Real UnitsAPI::CurrentFromLS(const Standard_Real aData,
|
||||
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(aQuantity,aData);
|
||||
aValue = Units::FromSI(aValue,current.ToCString());
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -246,9 +252,11 @@ Standard_Real UnitsAPI::CurrentFromSI(const Standard_Real aData,
|
||||
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
|
||||
aValue = Units::FromSI(aData,current.ToCString());
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -268,9 +276,11 @@ Standard_Real UnitsAPI::CurrentToAny(const Standard_Real aData,
|
||||
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
|
||||
aValue = AnyToAny(aData,current.ToCString(),aUnit);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -291,9 +301,11 @@ Standard_Real UnitsAPI::CurrentFromAny(const Standard_Real aData,
|
||||
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
|
||||
aValue = AnyToAny(aData,aUnit,current.ToCString());
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -317,8 +329,10 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
|
||||
if( quantity ) {
|
||||
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(quantity,aValue);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else
|
||||
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << ")" << endl;
|
||||
#endif
|
||||
return aValue;
|
||||
}
|
||||
|
||||
@@ -341,8 +355,10 @@ Standard_Real UnitsAPI::AnyToLS(const Standard_Real aData,
|
||||
if( quantity ) {
|
||||
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(quantity,aValue);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else
|
||||
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim << ")" << endl;
|
||||
#endif
|
||||
return aValue;
|
||||
}
|
||||
|
||||
@@ -394,8 +410,10 @@ Standard_Real UnitsAPI::AnyFromLS(const Standard_Real aData,
|
||||
if( quantity ) {
|
||||
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(quantity,aValue);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else
|
||||
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << ")" << endl;
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -445,9 +463,11 @@ Standard_Real UnitsAPI::LSToSI(const Standard_Real aData,
|
||||
if( CurrentUnits->Find(aQuantity) ) {
|
||||
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(aQuantity,aData);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
@@ -466,9 +486,11 @@ Standard_Real UnitsAPI::SIToLS(const Standard_Real aData,
|
||||
if( CurrentUnits->Find(aQuantity) ) {
|
||||
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(aQuantity,aValue);
|
||||
}
|
||||
#ifdef UNITSAPI_DEB
|
||||
else {
|
||||
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
return aValue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user