Skip to content

Commit aeae851

Browse files
committed
Remove useless const on POD return-type
Reported by Semmle's LGTM (https://lgtm.com/projects/g/diffblue/cbmc/alerts/?mode=list).
1 parent 7905492 commit aeae851

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

jbmc/src/java_bytecode/generic_parameter_specialization_map_keys.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ get_all_generic_parameters(const typet &type)
3939
/// on destruction; otherwise do nothing.
4040
/// \param parameters generic parameters that are the keys of the pairs to add
4141
/// \param types a type to add for each parameter
42-
const void generic_parameter_specialization_map_keyst::insert_pairs(
42+
void generic_parameter_specialization_map_keyst::insert_pairs(
4343
const std::vector<java_generic_parametert> &parameters,
4444
const std::vector<reference_typet> &types)
4545
{
@@ -90,7 +90,7 @@ const void generic_parameter_specialization_map_keyst::insert_pairs(
9090
/// \param pointer_type pointer type to get the specialized generic types from
9191
/// \param pointer_subtype_struct struct type to which the generic pointer
9292
/// points, must be generic if the pointer is generic
93-
const void generic_parameter_specialization_map_keyst::insert_pairs_for_pointer(
93+
void generic_parameter_specialization_map_keyst::insert_pairs_for_pointer(
9494
const pointer_typet &pointer_type,
9595
const typet &pointer_subtype_struct)
9696
{
@@ -139,7 +139,7 @@ const void generic_parameter_specialization_map_keyst::insert_pairs_for_pointer(
139139
/// \param symbol_type symbol type to get the specialized generic types from
140140
/// \param symbol_struct struct type of the symbol type, must be generic if
141141
/// the symbol is generic
142-
const void generic_parameter_specialization_map_keyst::insert_pairs_for_symbol(
142+
void generic_parameter_specialization_map_keyst::insert_pairs_for_symbol(
143143
const symbol_typet &symbol_type,
144144
const typet &symbol_struct)
145145
{

jbmc/src/java_bytecode/generic_parameter_specialization_map_keys.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ class generic_parameter_specialization_map_keyst
4747
generic_parameter_specialization_map_keyst &
4848
operator=(const generic_parameter_specialization_map_keyst &) = delete;
4949

50-
const void insert_pairs_for_pointer(
50+
void insert_pairs_for_pointer(
5151
const pointer_typet &pointer_type,
5252
const typet &pointer_subtype_struct);
53-
const void insert_pairs_for_symbol(
53+
void insert_pairs_for_symbol(
5454
const symbol_typet &symbol_type,
5555
const typet &symbol_struct);
5656

@@ -60,7 +60,7 @@ class generic_parameter_specialization_map_keyst
6060
/// Keys of the entries to pop on destruction
6161
std::vector<irep_idt> erase_keys;
6262

63-
const void insert_pairs(
63+
void insert_pairs(
6464
const std::vector<java_generic_parametert> &parameters,
6565
const std::vector<reference_typet> &types);
6666
};

jbmc/src/java_bytecode/java_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ class java_class_typet:public class_typet
111111
return set(ID_access, access);
112112
}
113113

114-
const bool get_is_inner_class() const
114+
bool get_is_inner_class() const
115115
{
116116
return get_bool(ID_is_inner_class);
117117
}
@@ -141,7 +141,7 @@ class java_class_typet:public class_typet
141141
return set(ID_super_class, super_class);
142142
}
143143

144-
const bool get_is_static_class() const
144+
bool get_is_static_class() const
145145
{
146146
return get_bool(ID_is_static);
147147
}
@@ -151,7 +151,7 @@ class java_class_typet:public class_typet
151151
return set(ID_is_static, is_static_class);
152152
}
153153

154-
const bool get_is_anonymous_class() const
154+
bool get_is_anonymous_class() const
155155
{
156156
return get_bool(ID_is_anonymous);
157157
}

src/goto-cc/linker_script_merge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class replacement_predicatet
5050
/// If this function returns true, the entire expression should be replaced by
5151
/// a pointer whose underlying symbol is the symbol returned by
5252
/// replacement_predicatet::inner_symbol().
53-
const bool match(const exprt &expr, const namespacet &ns) const
53+
bool match(const exprt &expr, const namespacet &ns) const
5454
{
5555
return _match(expr, ns);
5656
};

0 commit comments

Comments
 (0)