Skip to content

Commit 8dcff58

Browse files
author
thk123
committed
Code tidy changes
Clarifying comment in symbol_table and adding required braces Correcting an include postion Removed unusued method declaration
1 parent 79c0aaa commit 8dcff58

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

src/java_bytecode/java_object_factory.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Author: Daniel Kroening, [email protected]
66
77
\*******************************************************************/
88

9+
#include "java_object_factory.h"
910

1011
#include <unordered_set>
1112
#include <sstream>
@@ -26,7 +27,6 @@ Author: Daniel Kroening, [email protected]
2627

2728
#include <goto-programs/goto_functions.h>
2829

29-
#include "java_object_factory.h"
3030
#include "java_types.h"
3131
#include "java_utils.h"
3232

@@ -59,11 +59,6 @@ class java_object_factoryt
5959
const exprt &expr,
6060
const pointer_typet &ptr_type);
6161

62-
void gen_pointer_target_init(
63-
const exprt &expr,
64-
const typet &target_type,
65-
bool create_dynamic_objects,
66-
update_in_placet update_in_place);
6762

6863
code_assignt get_null_assignment(
6964
const exprt &expr,
@@ -356,8 +351,10 @@ void java_object_factoryt::gen_pointer_target_init(
356351
if(target.id()==ID_address_of)
357352
init_expr=target.op0();
358353
else
354+
{
359355
init_expr=
360356
dereference_exprt(target, target.type().subtype());
357+
}
361358
gen_nondet_init(
362359
assignments,
363360
init_expr,

src/util/symbol_table.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ Author: Daniel Kroening, [email protected]
1313

1414
/// Add a new symbol to the symbol table
1515
/// \param symbol: The symbol to be added to the symbol table
16-
/// \return Returns a boolean indicating whether the process failed, which
17-
/// should only happen if there is a symbol with the same name already in the
18-
/// symbol table
16+
/// \return Returns true if the process failed, which should only happen if
17+
/// there is a symbol with the same name already in the symbol table.
1918
bool symbol_tablet::add(const symbolt &symbol)
2019
{
2120
if(!symbols.insert(std::pair<irep_idt, symbolt>(symbol.name, symbol)).second)

0 commit comments

Comments
 (0)