Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/util/symbol_table_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ void symbol_table_baset::show(std::ostream &out) const
out << symbols.at(name);
}

symbol_table_baset::const_iteratort symbol_table_baset::end() const
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message doesn't match content

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure this change is even necessary; Develop symbol_table_baset already seems to have begin()/end().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a non-const version - this adds a const version

{
return symbols.end();
}

symbol_table_baset::const_iteratort symbol_table_baset::begin() const
{
return symbols.begin();
}

/// Print the contents of the symbol table.
/// \param out: The ostream to direct output to
/// \param symbol_table: The symbol table to print out
Expand Down
5 changes: 5 additions & 0 deletions src/util/symbol_table_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ class symbol_table_baset

virtual iteratort begin() = 0;
virtual iteratort end() = 0;

using const_iteratort = symbolst::const_iterator;

const_iteratort begin() const;
const_iteratort end() const;
};

std::ostream &
Expand Down
2 changes: 1 addition & 1 deletion unit/util/irep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SCENARIO("irept_memory", "[core][utils][irept]")
const std::size_t ref_count_size = 0;
#endif

#ifndef USE_STRING
#ifndef USE_STD_STRING
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make commit message title more precise.
"various things": there's only one thing in this commit.

const std::size_t data_size = sizeof(dstringt);
REQUIRE(sizeof(dstringt) == sizeof(unsigned));
#else
Expand Down