1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-07 18:30:55 +03:00

0027591: TKViewerTest, ViewerTest_CmdParser regression - methods ArgVec3f, ArgVec3d return inccorect values

Fix regression in methods ViewerTest_CmdParser::ArgVec3f, ::ArgVec3d, ::ArgVec, ::ArgPnt.
This commit is contained in:
apl 2016-06-10 16:35:00 +03:00 committed by bugmaster
parent 9d671cd1b0
commit 907fb7a5e0

View File

@ -178,8 +178,8 @@ std::string ViewerTest_CmdParser::Arg (const std::string& theOptionName, Standar
Graphic3d_Vec3 ViewerTest_CmdParser::ArgVec3f (const std::string& theOptionName, Standard_Integer theArgumentIndex) Graphic3d_Vec3 ViewerTest_CmdParser::ArgVec3f (const std::string& theOptionName, Standard_Integer theArgumentIndex)
{ {
return Graphic3d_Vec3 (static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str())), return Graphic3d_Vec3 (static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str())),
static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str())), static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex + 1).c_str())),
static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str()))); static_cast<Standard_ShortReal> (Draw::Atof (Arg (theOptionName, theArgumentIndex + 2).c_str())));
} }
//=============================================================================================== //===============================================================================================
@ -189,8 +189,8 @@ Graphic3d_Vec3 ViewerTest_CmdParser::ArgVec3f (const std::string& theOptionName,
Graphic3d_Vec3d ViewerTest_CmdParser::ArgVec3d (const std::string& theOptionName, Standard_Integer theArgumentIndex) Graphic3d_Vec3d ViewerTest_CmdParser::ArgVec3d (const std::string& theOptionName, Standard_Integer theArgumentIndex)
{ {
return Graphic3d_Vec3d ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()), return Graphic3d_Vec3d ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str()), Draw::Atof (Arg (theOptionName, theArgumentIndex + 1).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str())); Draw::Atof (Arg (theOptionName, theArgumentIndex + 2).c_str()));
} }
//=============================================================================================== //===============================================================================================
@ -200,8 +200,8 @@ Graphic3d_Vec3d ViewerTest_CmdParser::ArgVec3d (const std::string& theOptionName
gp_Vec ViewerTest_CmdParser::ArgVec (const std::string& theOptionName, Standard_Integer theArgumentIndex) gp_Vec ViewerTest_CmdParser::ArgVec (const std::string& theOptionName, Standard_Integer theArgumentIndex)
{ {
return gp_Vec ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()), return gp_Vec ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str()), Draw::Atof (Arg (theOptionName, theArgumentIndex + 1).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str())); Draw::Atof (Arg (theOptionName, theArgumentIndex + 2).c_str()));
} }
//=============================================================================================== //===============================================================================================
@ -211,8 +211,8 @@ gp_Vec ViewerTest_CmdParser::ArgVec (const std::string& theOptionName, Standard_
gp_Pnt ViewerTest_CmdParser::ArgPnt (const std::string& theOptionName, Standard_Integer theArgumentIndex) gp_Pnt ViewerTest_CmdParser::ArgPnt (const std::string& theOptionName, Standard_Integer theArgumentIndex)
{ {
return gp_Pnt ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()), return gp_Pnt ( Draw::Atof (Arg (theOptionName, theArgumentIndex ).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str()), Draw::Atof (Arg (theOptionName, theArgumentIndex + 1).c_str()),
Draw::Atof (Arg (theOptionName, theArgumentIndex).c_str())); Draw::Atof (Arg (theOptionName, theArgumentIndex + 2).c_str()));
} }
//=============================================================================================== //===============================================================================================