Skip to content

Commit

Permalink
add default ctor() for FileArchive
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed May 8, 2024
1 parent 35b0cb5 commit b432818
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion OdbDesignLib/FileModel/Design/FileArchive.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "FileArchive.h"
#include "FileArchive.h"
#include "FileArchive.h"
#include <filesystem>
#include "ArchiveExtractor.h"
#include "MiscInfoFile.h"
Expand All @@ -15,8 +16,12 @@ using namespace std::filesystem;

namespace Odb::Lib::FileModel::Design
{
FileArchive::FileArchive()
: m_filePath()
{
}

FileArchive::FileArchive(std::string path)
FileArchive::FileArchive(const std::string& path)
: m_filePath(path)
{
}
Expand Down
3 changes: 2 additions & 1 deletion OdbDesignLib/FileModel/Design/FileArchive.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace Odb::Lib::FileModel::Design
class ODBDESIGN_EXPORT FileArchive : public IProtoBuffable<Odb::Lib::Protobuf::FileArchive>, public ISaveable
{
public:
FileArchive(std::string path);
FileArchive();
FileArchive(const std::string& path);
~FileArchive();

std::string GetRootDir() const;
Expand Down
2 changes: 1 addition & 1 deletion OdbDesignLib/ProductModel/Design.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ namespace Odb::Lib::ProductModel
m_name = message.name();
m_productModel = message.productmodel();

m_pFileModel = std::make_shared<FileModel::Design::FileArchive>("");
m_pFileModel = std::make_shared<FileModel::Design::FileArchive>();
m_pFileModel->from_protobuf(message.filemodel());

for (const auto& pNetMsg : message.nets())
Expand Down

0 comments on commit b432818

Please sign in to comment.