Skip to content

Commit

Permalink
MSVC fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed Aug 30, 2024
1 parent 50ccce4 commit 1c18a5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions inc/smjni/java_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ namespace smjni
return ret;
}
friend iterator operator+(const iterator & me, jsize dist) noexcept
{ return iterator(*me->m_parent, me->m_idx + dist); }
{ return iterator(*me.m_parent, me.m_idx + dist); }
friend iterator operator+(jsize dist, const iterator & me) noexcept
{ return iterator(*me->m_parent, me->m_idx + dist); }
{ return iterator(*me.m_parent, me.m_idx + dist); }
friend iterator operator-(const iterator & me, jsize dist) noexcept
{ return iterator(*me->m_parent, me->m_idx - dist); }
{ return iterator(*me.m_parent, me.m_idx - dist); }
friend jsize operator-(const iterator & lhs, const iterator & rhs) noexcept
{ return lhs.m_idx - rhs.m_idx; }

Expand Down Expand Up @@ -274,11 +274,11 @@ namespace smjni
return ret;
}
friend const_iterator operator+(const const_iterator & me, jsize dist) noexcept
{ return const_iterator(*me->m_parent, me->m_idx + dist); }
{ return const_iterator(*me.m_parent, me.m_idx + dist); }
friend const_iterator operator+(jsize dist, const const_iterator & me) noexcept
{ return const_iterator(*me->m_parent, me->m_idx + dist); }
{ return const_iterator(*me.m_parent, me.m_idx + dist); }
friend const_iterator operator-(const const_iterator & me, jsize dist) noexcept
{ return const_iterator(*me->m_parent, me->m_idx - dist); }
{ return const_iterator(*me.m_parent, me.m_idx - dist); }
friend jsize operator-(const const_iterator & lhs, const const_iterator & rhs) noexcept
{ return lhs.m_idx - rhs.m_idx; }

Expand Down
2 changes: 2 additions & 0 deletions tests/src/cpp/array_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
#include <doctest.h>

#include <vector>
#include <array>
#include <iterator>
#include <algorithm>

using namespace smjni;

Expand Down

0 comments on commit 1c18a5f

Please sign in to comment.