* include/abg-ctf-reader.h (create_read_context): Pass the string
by reference.
* src/abg-ctf-reader.cc (ctf_reader::read_context): Likewise.
(create_read_context): Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
{
class read_context;
-read_context *create_read_context (std::string elf_path,
- ir::environment *env);
-corpus_sptr read_corpus (read_context *ctxt,
- elf_reader::status& status);
+read_context *create_read_context(const std::string& elf_path,
+ ir::environment *env);
+corpus_sptr read_corpus(read_context *ctxt,
+ elf_reader::status& status);
} // end namespace ctf_reader
} // end namespace abigail
/// Constructor.
///
/// @param elf_path the path to the ELF file.
- read_context(string elf_path, ir::environment *env)
+ read_context(const string& elf_path, ir::environment *env)
{
types_map.clear();
filename = elf_path;
/// @param env a libabigail IR environment.
read_context *
-create_read_context(std::string elf_path, ir::environment *env)
+create_read_context(const std::string& elf_path,
+ ir::environment *env)
{
return new read_context(elf_path, env);
}