forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove
java_bytecode::swap
and return using optionalt
instead.
This removes the `swap` method as suggested in diffblue#2011 Avoiding having a `swap`method, makes updates less error prone.
- Loading branch information
1 parent
e5e0897
commit 52a669f
Showing
6 changed files
with
37 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,28 +18,6 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include "expr2java.h" | ||
|
||
void java_bytecode_parse_treet::classt::swap( | ||
classt &other) | ||
{ | ||
other.name.swap(name); | ||
other.extends.swap(extends); | ||
std::swap(other.is_enum, is_enum); | ||
std::swap(other.enum_elements, enum_elements); | ||
std::swap(other.is_abstract, is_abstract); | ||
std::swap(other.is_public, is_public); | ||
std::swap(other.is_protected, is_protected); | ||
std::swap(other.is_private, is_private); | ||
std::swap(other.is_final, is_final); | ||
std::swap(other.signature, signature); | ||
other.implements.swap(implements); | ||
other.fields.swap(fields); | ||
other.methods.swap(methods); | ||
other.annotations.swap(annotations); | ||
std::swap( | ||
other.attribute_bootstrapmethods_read, attribute_bootstrapmethods_read); | ||
std::swap(other.lambda_method_handle_map, lambda_method_handle_map); | ||
} | ||
|
||
void java_bytecode_parse_treet::output(std::ostream &out) const | ||
{ | ||
parsed_class.output(out); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,15 +12,12 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <iosfwd> | ||
#include <string> | ||
#include <util/optional.h> | ||
|
||
bool java_bytecode_parse( | ||
const std::string &file, | ||
class java_bytecode_parse_treet &, | ||
class message_handlert &); | ||
optionalt<class java_bytecode_parse_treet> | ||
java_bytecode_parse(const std::string &file, class message_handlert &); | ||
|
||
bool java_bytecode_parse( | ||
std::istream &, | ||
class java_bytecode_parse_treet &, | ||
class message_handlert &); | ||
optionalt<class java_bytecode_parse_treet> | ||
java_bytecode_parse(std::istream &, class message_handlert &); | ||
|
||
#endif // CPROVER_JAVA_BYTECODE_JAVA_BYTECODE_PARSER_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters