Closed leoetlino closed 2 years ago
No, still has the same issue as before:
/home/monsterdruide1/OdysseyDecompSead/OdysseyDecomp/lib/sead/modules/src/heap/seadHeapMgr.cpp:237:10: error: call to deleted constructor of 'sead::ScopedLock<sead::CriticalSection>'
auto lock = makeScopedLock(sHeapTreeLockCS);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/monsterdruide1/OdysseyDecompSead/OdysseyDecomp/lib/sead/include/prim/seadScopedLock.h:23:5: note: 'ScopedLock' has been explicitly marked deleted here
ScopedLock(const ScopedLock& other) = delete;
^
Looks like this PR has fixed makeScopedLock at least, but not the usages.
You might need to do auto lock{makeScopedLock(...)}
Nope, still not working:
/home/monsterdruide1/OdysseyDecompSead/OdysseyDecomp/lib/sead/modules/src/heap/seadHeapMgr.cpp:237:10: error: call to deleted constructor of 'sead::ScopedLock<sead::CriticalSection>'
auto lock{makeScopedLock(sHeapTreeLockCS)};
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/monsterdruide1/OdysseyDecompSead/OdysseyDecomp/lib/sead/include/prim/seadScopedLock.h:23:5: note: 'ScopedLock' has been explicitly marked deleted here
ScopedLock(const ScopedLock& other) = delete;
^
Ugh I guess you still need C++17 copy/move elision for this to work. I think we can make this work by adding a move constructor to ScopedLock...
@MonsterDruide1 can you try again?
Now getting a different error:
/home/monsterdruide1/OdysseyDecompSead/OdysseyDecomp/lib/sead/include/prim/seadScopedLock.h:16:53: error: overload resolution selected deleted operator '='
ScopedLock(ScopedLock&& other) noexcept { *this = other; }
~~~~~ ^ ~~~~~
Whoops, looks like I forgot to std::move the value... I'll fix this tonight
@MonsterDruide1 should be fixed now
Sorry for the delay, but - yes, this works correctly now, and results in the same match!
See https://github.com/open-ead/sead/pull/105#pullrequestreview-1064473605
@MonsterDruide1 let me know if this fixes makeScopedLock on Clang 3.9.
This change is