Skip to content

Commit 1c73c4d

Browse files
Move string into map rather than copy it
1 parent 13dc85b commit 1c73c4d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

jbmc/src/java_bytecode/jar_file.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ void jar_filet::initialize_file_index()
2020
{
2121
const size_t file_count=m_zip_archive.get_num_files();
2222
for(size_t index=0; index<file_count; index++)
23-
{
24-
const auto filename=m_zip_archive.get_filename(index);
25-
m_name_to_index.emplace(filename, index);
26-
}
23+
m_name_to_index.emplace(m_zip_archive.get_filename(index), index);
2724
}
2825

2926
/// This constructor creates a jar_file object whose contents

0 commit comments

Comments
 (0)