Skip to content

Commit

Permalink
t
Browse files Browse the repository at this point in the history
  • Loading branch information
nickchan2 committed Mar 29, 2024
1 parent 9990172 commit 79ea265
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions loaders/loaders.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
#include "loaders.h"

#include <fstream>
#include <string>
#include <vector>

agi::loaders::Res agi::loaders::elf_32(std::string_view file_name,
agi::loaders::Res agi::loaders::elf_32(std::string file_name,
BaseWriteFunctor & write_functor)
{
std::ifstream file(file_name, std::ios::binary);
Expand Down Expand Up @@ -182,7 +183,7 @@ agi::loaders::Res agi::loaders::elf_32(std::string_view file_name,
agi::loaders::Res agi::loaders::verilog_32(std::string_view file_name,
BaseWriteFunctor & write_functor)
{
std::fstream file = std::fstream(file_name);
std::fstream file(file_name);
if (!file) {
return Res::FILE_OPEN_ERROR;
}
Expand Down
3 changes: 2 additions & 1 deletion loaders/loaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <cstddef>
#include <cstdint>
#include <span>
#include <string>
#include <string_view>

namespace agi::loaders {
Expand Down Expand Up @@ -49,7 +50,7 @@ class BufferWriteFunctor : public BaseWriteFunctor {
size_t offset_;
};

Res elf_32(std::string_view file_name, BaseWriteFunctor & write_functor);
Res elf_32(std::string file_name, BaseWriteFunctor & write_functor);

Res verilog_32(std::string_view file_name, BaseWriteFunctor & write_functor);

Expand Down

0 comments on commit 79ea265

Please sign in to comment.