diff --git a/src/TObj/TObj_Application.cxx b/src/TObj/TObj_Application.cxx index 7b0fd73225..514aaf4be4 100644 --- a/src/TObj/TObj_Application.cxx +++ b/src/TObj/TObj_Application.cxx @@ -80,8 +80,8 @@ Standard_CString TObj_Application::ResourcesName() //======================================================================= Standard_Boolean TObj_Application::SaveDocument - (const Handle(TDocStd_Document)& theSourceDoc, - const TCollection_ExtendedString theTargetFile) + (const Handle(TDocStd_Document)& theSourceDoc, + const TCollection_ExtendedString& theTargetFile) { myIsError = Standard_False; PCDM_StoreStatus aStatus = SaveAs (theSourceDoc, theTargetFile); @@ -125,8 +125,8 @@ Standard_Boolean TObj_Application::SaveDocument //======================================================================= Standard_Boolean TObj_Application::LoadDocument - (const TCollection_ExtendedString theSourceFile, - Handle(TDocStd_Document)& theTargetDoc) + (const TCollection_ExtendedString& theSourceFile, + Handle(TDocStd_Document)& theTargetDoc) { myIsError = Standard_False; PCDM_ReaderStatus aStatus = PCDM_RS_ReaderException; diff --git a/src/TObj/TObj_Application.hxx b/src/TObj/TObj_Application.hxx index 91fc01e0bd..d0a34beafe 100644 --- a/src/TObj/TObj_Application.hxx +++ b/src/TObj/TObj_Application.hxx @@ -24,12 +24,10 @@ #include #include - //! //! This is a base class for OCAF based TObj models //! with declared virtual methods //! - class TObj_Application : public TDocStd_Application { public: @@ -45,14 +43,14 @@ public: */ //! Saving the OCAF document to a file - virtual Standard_EXPORT Standard_Boolean SaveDocument - (const Handle(TDocStd_Document)& theSourceDoc, - const TCollection_ExtendedString theTargetFile); + Standard_EXPORT virtual Standard_Boolean SaveDocument + (const Handle(TDocStd_Document)& theSourceDoc, + const TCollection_ExtendedString& theTargetFile); //! Loading the OCAF document from a file - virtual Standard_EXPORT Standard_Boolean LoadDocument - (const TCollection_ExtendedString theSourceFile, - Handle(TDocStd_Document)& theTargetDoc); + Standard_EXPORT virtual Standard_Boolean LoadDocument + (const TCollection_ExtendedString& theSourceFile, + Handle(TDocStd_Document)& theTargetDoc); //! Create the OCAF document from scratch virtual Standard_EXPORT Standard_Boolean CreateNewDocument @@ -117,7 +115,3 @@ public: DEFINE_STANDARD_HANDLE(TObj_Application,TDocStd_Application) #endif - -#ifdef _MSC_VER -#pragma once -#endif diff --git a/src/TObj/TObj_Model.cxx b/src/TObj/TObj_Model.cxx index e631269999..e7466fc33d 100644 --- a/src/TObj/TObj_Model.cxx +++ b/src/TObj/TObj_Model.cxx @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -108,7 +107,7 @@ void TObj_Model::CloseDocument (const Handle(TDocStd_Document)& theDoc) //purpose : Loads the model from the file //======================================================================= -Standard_Boolean TObj_Model::Load (const TCollection_ExtendedString theFile) +Standard_Boolean TObj_Model::Load (const TCollection_ExtendedString& theFile) { // Return status Standard_Boolean aStatus = Standard_True; @@ -257,7 +256,7 @@ Standard_Boolean TObj_Model::Save () //purpose : Save the model to a file //======================================================================= -Standard_Boolean TObj_Model::SaveAs (const TCollection_ExtendedString theFile) +Standard_Boolean TObj_Model::SaveAs (const TCollection_ExtendedString& theFile) { TObj_Assistant::ClearTypeMap(); // OCAF document @@ -744,7 +743,7 @@ void TObj_Model::SetModified (const Standard_Boolean theModified) //purpose : Check whether the document contains the Ocaf data //======================================================================= -Standard_Boolean TObj_Model::checkDocumentEmpty (const TCollection_ExtendedString theFile) +Standard_Boolean TObj_Model::checkDocumentEmpty (const TCollection_ExtendedString& theFile) { if (theFile.IsEmpty()) return Standard_True; diff --git a/src/TObj/TObj_Model.hxx b/src/TObj/TObj_Model.hxx index bff5aece50..68f3ccf6ac 100644 --- a/src/TObj/TObj_Model.hxx +++ b/src/TObj/TObj_Model.hxx @@ -18,9 +18,10 @@ #ifndef TObj_Model_HeaderFile #define TObj_Model_HeaderFile +#include #include #include -#include +#include class TObj_TNameContainer; class TObj_Partition; @@ -64,8 +65,7 @@ class TObj_Model : public MMgt_TShared Standard_EXPORT ~TObj_Model (); //! Check whether the document contains the OCAF data. - Standard_EXPORT virtual Standard_Boolean - checkDocumentEmpty(const TCollection_ExtendedString theFile); + Standard_EXPORT virtual Standard_Boolean checkDocumentEmpty(const TCollection_ExtendedString& theFile); public: /** @@ -86,10 +86,10 @@ class TObj_Model : public MMgt_TShared //! Load the OCAF model from a file. If the filename is empty or file does //! not exists, it just initializes model by empty data. - virtual Standard_EXPORT Standard_Boolean Load (const TCollection_ExtendedString theFile); + Standard_EXPORT virtual Standard_Boolean Load (const TCollection_ExtendedString& theFile); //! Save the model to a file - virtual Standard_EXPORT Standard_Boolean SaveAs (const TCollection_ExtendedString theFile); + Standard_EXPORT virtual Standard_Boolean SaveAs (const TCollection_ExtendedString& theFile); //! Save the model to the same file Standard_EXPORT Standard_Boolean Save ();