summaryrefslogtreecommitdiff
path: root/mediumlevelilinstruction.h
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-08-01 14:41:11 -0400
committerGlenn Smith <glenn@vector35.com>2025-08-01 21:37:40 -0400
commit1455831091552327502612013281528881111506 (patch)
tree39d38ce33b3f6e869048af4fcd76804907f65b1c /mediumlevelilinstruction.h
parent1681053397485739253763507272419110508907 (diff)
Make the IL iterators real iterators for std::find_if
Diffstat (limited to 'mediumlevelilinstruction.h')
-rw-r--r--mediumlevelilinstruction.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h
index 23413b4a..a1f8e00d 100644
--- a/mediumlevelilinstruction.h
+++ b/mediumlevelilinstruction.h
@@ -220,6 +220,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef uint64_t value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
#ifdef BINARYNINJACORE_LIBRARY
MediumLevelILFunction* function;
#else
@@ -258,6 +264,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef size_t value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
MediumLevelILIntegerList::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
@@ -292,6 +304,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef std::pair<uint64_t, size_t> value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
MediumLevelILIntegerList::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
@@ -327,6 +345,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef Variable value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
MediumLevelILIntegerList::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
@@ -361,6 +385,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef SSAVariable value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
MediumLevelILIntegerList::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }
bool operator!=(const ListIterator& a) const { return pos != a.pos; }
@@ -397,6 +427,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef MediumLevelILInstruction value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
size_t instructionIndex;
MediumLevelILIntegerList::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }
@@ -878,6 +914,12 @@ namespace BinaryNinja
{
struct ListIterator
{
+ typedef std::forward_iterator_tag iterator_category;
+ typedef MediumLevelILOperand value_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef void pointer;
+ typedef value_type reference;
+
const MediumLevelILOperandList* owner;
_STD_VECTOR<MediumLevelILOperandUsage>::const_iterator pos;
bool operator==(const ListIterator& a) const { return pos == a.pos; }