]> sourceware.org Git - libabigail.git/commitdiff
ctf-reader: Use argument by reference reading the context
authorGuillermo E. Martinez via Libabigail <libabigail@sourceware.org>
Thu, 18 Nov 2021 02:56:04 +0000 (20:56 -0600)
committerDodji Seketeli <dodji@redhat.com>
Mon, 22 Nov 2021 10:34:56 +0000 (11:34 +0100)
* 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>
include/abg-ctf-reader.h
src/abg-ctf-reader.cc

index c0d8bb2b08f44591fd76ae5701d868a9d714dcf5..56b2bf911abd8441c2687211b2225f3d9d12a0f3 100644 (file)
@@ -25,10 +25,10 @@ namespace ctf_reader
 {
 
 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
index 0370c8aa959ce05c2a01700a42006759efd53cb6..2c2c204d55fa049b2709eb5d49d7ba25e05bc71c 100644 (file)
@@ -102,7 +102,7 @@ public:
   /// 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;
@@ -1060,7 +1060,8 @@ slurp_elf_info(read_context *ctxt, corpus_sptr corp)
 /// @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);
 }
This page took 0.035998 seconds and 5 git commands to generate.