Skip to content

Commit e35f2fc

Browse files
NathanJPhillipssmowton
authored andcommitted
Misc review requests
1 parent a9d802b commit e35f2fc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/cpp/cpp_typecheck_compound_type.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
536536
vt_symb_type.type.set(ID_name, vt_symb_type.name);
537537
vt_symb_type.is_type=true;
538538

539-
bool failed=!symbol_table.insert(std::move(vt_symb_type));
539+
const bool failed=!symbol_table.insert(std::move(vt_symb_type));
540540
assert(!failed);
541541

542542
// add a virtual-table pointer
@@ -612,7 +612,7 @@ void cpp_typecheckt::typecheck_compound_declarator(
612612
arg.set(ID_C_identifier, arg_symb.name);
613613

614614
// add the parameter to the symbol table
615-
bool failed=!symbol_table.insert(std::move(arg_symb));
615+
const bool failed=!symbol_table.insert(std::move(arg_symb));
616616
assert(!failed);
617617
}
618618

src/java_bytecode/java_utils.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ void generate_class_stub(
8686
new_symbol.mode=ID_java;
8787
new_symbol.is_type=true;
8888

89-
auto res=symbol_table.insert(std::move(new_symbol));
89+
optionalt<std::reference_wrapper<symbolt>> res=
90+
symbol_table.insert(std::move(new_symbol));
9091

9192
if(!res)
9293
{

src/util/symbol_table.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ void symbol_tablet::erase(const symbolst::const_iterator &entry)
115115
const symbolt &symbol=entry->second;
116116

117117
symbol_base_mapt::const_iterator
118-
base_it=symbol_base_map.lower_bound(entry->second.base_name),
118+
base_it=symbol_base_map.lower_bound(entry->second.base_name);
119+
symbol_base_mapt::const_iterator
119120
base_it_end=symbol_base_map.upper_bound(entry->second.base_name);
120121
while(base_it!=base_it_end && base_it->second!=symbol.name)
121122
++base_it;

0 commit comments

Comments
 (0)