mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 13:15:35 +00:00
Merge branch 'CPP20_support' into 'master'
Support C++20 See merge request OpenMW/openmw!1705
This commit is contained in:
commit
3afa46b25e
6 changed files with 14 additions and 14 deletions
|
@ -9,7 +9,7 @@ brew update --quiet
|
|||
[ -z "${TRAVIS}" ] && brew uninstall --ignore-dependencies qt@6 || true
|
||||
|
||||
# Some of these tools can come from places other than brew, so check before installing
|
||||
[ -z "${TRAVIS}" ] && brew install fontconfig
|
||||
[ -z "${TRAVIS}" ] && brew reinstall fontconfig
|
||||
command -v ccache >/dev/null 2>&1 || brew install ccache
|
||||
command -v cmake >/dev/null 2>&1 || brew install cmake
|
||||
command -v qmake >/dev/null 2>&1 || brew install qt@5
|
||||
|
|
|
@ -11,7 +11,7 @@ CSVWidget::ColorPickerPopup::ColorPickerPopup(QWidget *parent)
|
|||
: QFrame(parent)
|
||||
{
|
||||
setWindowFlags(Qt::Popup);
|
||||
setFrameStyle(QFrame::Box | QFrame::Plain);
|
||||
setFrameStyle(QFrame::Box | static_cast<int>(QFrame::Plain));
|
||||
hide();
|
||||
|
||||
mColorPicker = new QColorDialog(this);
|
||||
|
|
|
@ -14,7 +14,7 @@ TableHeaderMouseEventHandler::TableHeaderMouseEventHandler(DragRecordTable * par
|
|||
{
|
||||
header.setContextMenuPolicy(Qt::ContextMenuPolicy::CustomContextMenu);
|
||||
connect(
|
||||
&header, &QHeaderView::customContextMenuRequested, [=](const QPoint & position) { showContextMenu(position); });
|
||||
&header, &QHeaderView::customContextMenuRequested, [this](const QPoint & position) { showContextMenu(position); });
|
||||
|
||||
header.viewport()->installEventFilter(this);
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ QMenu & TableHeaderMouseEventHandler::createContextMenu()
|
|||
action->setChecked(!table.isColumnHidden(i));
|
||||
menu->addAction(action);
|
||||
|
||||
connect(action, &QAction::triggered, [=]() {
|
||||
connect(action, &QAction::triggered, [this, &action, &i]() {
|
||||
table.setColumnHidden(i, !action->isChecked());
|
||||
action->setChecked(!action->isChecked());
|
||||
action->toggle();
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace MWLua
|
|||
touchpadEvent["finger"] = sol::readonly_property(
|
||||
[](const SDLUtil::TouchEvent& e) -> int { return e.mFinger; });
|
||||
touchpadEvent["position"] = sol::readonly_property(
|
||||
[](const SDLUtil::TouchEvent& e) -> osg::Vec2f { return osg::Vec2f(e.mX, e.mY);});
|
||||
[](const SDLUtil::TouchEvent& e) -> osg::Vec2f { return {e.mX, e.mY};});
|
||||
touchpadEvent["pressure"] = sol::readonly_property(
|
||||
[](const SDLUtil::TouchEvent& e) -> float { return e.mPressure; });
|
||||
|
||||
|
@ -177,10 +177,10 @@ namespace MWLua
|
|||
{"TriggerLeft", SDL_CONTROLLER_AXIS_TRIGGERLEFT},
|
||||
{"TriggerRight", SDL_CONTROLLER_AXIS_TRIGGERRIGHT},
|
||||
|
||||
{"LookUpDown", SDL_CONTROLLER_AXIS_MAX + MWInput::A_LookUpDown},
|
||||
{"LookLeftRight", SDL_CONTROLLER_AXIS_MAX + MWInput::A_LookLeftRight},
|
||||
{"MoveForwardBackward", SDL_CONTROLLER_AXIS_MAX + MWInput::A_MoveForwardBackward},
|
||||
{"MoveLeftRight", SDL_CONTROLLER_AXIS_MAX + MWInput::A_MoveLeftRight}
|
||||
{"LookUpDown", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_LookUpDown)},
|
||||
{"LookLeftRight", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_LookLeftRight)},
|
||||
{"MoveForwardBackward", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_MoveForwardBackward)},
|
||||
{"MoveLeftRight", SDL_CONTROLLER_AXIS_MAX + static_cast<int>(MWInput::A_MoveLeftRight)}
|
||||
}));
|
||||
|
||||
api["KEY"] = LuaUtil::makeReadOnly(context.mLua->tableFromPairs<std::string_view, SDL_Scancode>({
|
||||
|
|
|
@ -453,7 +453,7 @@ namespace MWRender
|
|||
: mLeft(left), mTop(top), mRight(right), mBottom(bottom)
|
||||
{
|
||||
}
|
||||
bool operator == (const Box& other)
|
||||
bool operator == (const Box& other) const
|
||||
{
|
||||
return mLeft == other.mLeft && mTop == other.mTop && mRight == other.mRight && mBottom == other.mBottom;
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ namespace Misc
|
|||
public:
|
||||
iterator(WeakCache* cache, typename Map::iterator current, typename Map::iterator end);
|
||||
iterator& operator++();
|
||||
bool operator==(const iterator& other);
|
||||
bool operator!=(const iterator& other);
|
||||
bool operator==(const iterator& other) const;
|
||||
bool operator!=(const iterator& other) const;
|
||||
StrongPtr operator*();
|
||||
private:
|
||||
WeakCache* mCache;
|
||||
|
@ -74,13 +74,13 @@ namespace Misc
|
|||
}
|
||||
|
||||
template <typename Key, typename T>
|
||||
bool WeakCache<Key, T>::iterator::operator==(const iterator& other)
|
||||
bool WeakCache<Key, T>::iterator::operator==(const iterator& other) const
|
||||
{
|
||||
return mCurrent == other.mCurrent;
|
||||
}
|
||||
|
||||
template <typename Key, typename T>
|
||||
bool WeakCache<Key, T>::iterator::operator!=(const iterator& other)
|
||||
bool WeakCache<Key, T>::iterator::operator!=(const iterator& other) const
|
||||
{
|
||||
return !(*this == other);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue