1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-28 08:37:12 +00:00

Merge branch 'fixandclean' into 'master'

Fix opencs build and remove some clang warnings

See merge request OpenMW/openmw!1078
This commit is contained in:
psi29a 2021-08-01 12:11:17 +00:00
commit 4b48e62b64
4 changed files with 12 additions and 15 deletions

View File

@ -295,7 +295,7 @@ CSMWorld::RevertCommand::RevertCommand (IdTable& model, const std::string& id, Q
{
setText (("Revert record " + id).c_str());
mOld = std::move(model.getRecord (id).clone());
mOld = model.getRecord (id).clone();
}
CSMWorld::RevertCommand::~RevertCommand()
@ -330,7 +330,7 @@ CSMWorld::DeleteCommand::DeleteCommand (IdTable& model,
{
setText (("Delete record " + id).c_str());
mOld = std::move(model.getRecord (id).clone());
mOld = model.getRecord (id).clone();
}
CSMWorld::DeleteCommand::~DeleteCommand()

View File

@ -1,6 +1,8 @@
#ifndef CSM_WOLRD_INFOCOLLECTION_H
#define CSM_WOLRD_INFOCOLLECTION_H
#include <unordered_map>
#include "collection.hpp"
#include "info.hpp"
@ -72,19 +74,19 @@ namespace CSMWorld
void removeDialogueInfos(const std::string& dialogueId);
void removeRows (int index, int count);
void removeRows (int index, int count) override;
void appendBlankRecord (const std::string& id,
UniversalId::Type type = UniversalId::Type_None);
UniversalId::Type type = UniversalId::Type_None) override;
int searchId (const std::string& id) const;
int searchId (const std::string& id) const override;
void appendRecord (std::unique_ptr<RecordBase> record,
UniversalId::Type type = UniversalId::Type_None);
UniversalId::Type type = UniversalId::Type_None) override;
void insertRecord (std::unique_ptr<RecordBase> record,
int index,
UniversalId::Type type = UniversalId::Type_None);
UniversalId::Type type = UniversalId::Type_None) override;
};
}

View File

@ -46,9 +46,9 @@ namespace CSMWorld
Record(State state,
const ESXRecordT *base = 0, const ESXRecordT *modified = 0);
std::unique_ptr<RecordBase> clone() const;
std::unique_ptr<RecordBase> clone() const override;
std::unique_ptr<RecordBase> modifiedCopy() const;
std::unique_ptr<RecordBase> modifiedCopy() const override;
void assign (const RecordBase& record) override;

View File

@ -764,7 +764,6 @@ void CSMWorld::RefIdCollection::setNestedData(int row, int column, const QVarian
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
nestedAdapter.setNestedData(&mColumns.at (column), mData, localIndex.first, data, subRow, subColumn);
return;
}
void CSMWorld::RefIdCollection::removeRows (int index, int count)
@ -778,7 +777,6 @@ void CSMWorld::RefIdCollection::removeNestedRows(int row, int column, int subRow
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
nestedAdapter.removeNestedRow(&mColumns.at (column), mData, localIndex.first, subRow);
return;
}
void CSMWorld::RefIdCollection::appendBlankRecord (const std::string& id, UniversalId::Type type)
@ -805,8 +803,7 @@ void CSMWorld::RefIdCollection::cloneRecord(const std::string& origin,
const std::string& destination,
const CSMWorld::UniversalId::Type type)
{
std::unique_ptr<RecordBase> newRecord =
std::move(mData.getRecord(mData.searchId(origin)).modifiedCopy());
std::unique_ptr<RecordBase> newRecord = mData.getRecord(mData.searchId(origin)).modifiedCopy();
mAdapters.find(type)->second->setId(*newRecord, destination);
mData.insertRecord(std::move(newRecord), type, destination);
}
@ -896,7 +893,6 @@ void CSMWorld::RefIdCollection::addNestedRow(int row, int col, int position)
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(col), localIndex.second);
nestedAdapter.addNestedRow(&mColumns.at(col), mData, localIndex.first, position);
return;
}
void CSMWorld::RefIdCollection::setNestedTable(int row, int column, const CSMWorld::NestedTableWrapperBase& nestedTable)
@ -905,7 +901,6 @@ void CSMWorld::RefIdCollection::setNestedTable(int row, int column, const CSMWor
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
nestedAdapter.setNestedTable(&mColumns.at(column), mData, localIndex.first, nestedTable);
return;
}
CSMWorld::NestedTableWrapperBase* CSMWorld::RefIdCollection::nestedTable(int row, int column) const