mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-15 20:36:44 +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:
commit
4b48e62b64
4 changed files with 12 additions and 15 deletions
|
@ -295,7 +295,7 @@ CSMWorld::RevertCommand::RevertCommand (IdTable& model, const std::string& id, Q
|
||||||
{
|
{
|
||||||
setText (("Revert record " + id).c_str());
|
setText (("Revert record " + id).c_str());
|
||||||
|
|
||||||
mOld = std::move(model.getRecord (id).clone());
|
mOld = model.getRecord (id).clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::RevertCommand::~RevertCommand()
|
CSMWorld::RevertCommand::~RevertCommand()
|
||||||
|
@ -330,7 +330,7 @@ CSMWorld::DeleteCommand::DeleteCommand (IdTable& model,
|
||||||
{
|
{
|
||||||
setText (("Delete record " + id).c_str());
|
setText (("Delete record " + id).c_str());
|
||||||
|
|
||||||
mOld = std::move(model.getRecord (id).clone());
|
mOld = model.getRecord (id).clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::DeleteCommand::~DeleteCommand()
|
CSMWorld::DeleteCommand::~DeleteCommand()
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#ifndef CSM_WOLRD_INFOCOLLECTION_H
|
#ifndef CSM_WOLRD_INFOCOLLECTION_H
|
||||||
#define CSM_WOLRD_INFOCOLLECTION_H
|
#define CSM_WOLRD_INFOCOLLECTION_H
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "collection.hpp"
|
#include "collection.hpp"
|
||||||
#include "info.hpp"
|
#include "info.hpp"
|
||||||
|
|
||||||
|
@ -72,19 +74,19 @@ namespace CSMWorld
|
||||||
|
|
||||||
void removeDialogueInfos(const std::string& dialogueId);
|
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,
|
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,
|
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,
|
void insertRecord (std::unique_ptr<RecordBase> record,
|
||||||
int index,
|
int index,
|
||||||
UniversalId::Type type = UniversalId::Type_None);
|
UniversalId::Type type = UniversalId::Type_None) override;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,9 +46,9 @@ namespace CSMWorld
|
||||||
Record(State state,
|
Record(State state,
|
||||||
const ESXRecordT *base = 0, const ESXRecordT *modified = 0);
|
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;
|
void assign (const RecordBase& record) override;
|
||||||
|
|
||||||
|
|
|
@ -764,7 +764,6 @@ void CSMWorld::RefIdCollection::setNestedData(int row, int column, const QVarian
|
||||||
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
|
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
|
||||||
|
|
||||||
nestedAdapter.setNestedData(&mColumns.at (column), mData, localIndex.first, data, subRow, subColumn);
|
nestedAdapter.setNestedData(&mColumns.at (column), mData, localIndex.first, data, subRow, subColumn);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::RefIdCollection::removeRows (int index, int count)
|
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);
|
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
|
||||||
|
|
||||||
nestedAdapter.removeNestedRow(&mColumns.at (column), mData, localIndex.first, subRow);
|
nestedAdapter.removeNestedRow(&mColumns.at (column), mData, localIndex.first, subRow);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::RefIdCollection::appendBlankRecord (const std::string& id, UniversalId::Type type)
|
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 std::string& destination,
|
||||||
const CSMWorld::UniversalId::Type type)
|
const CSMWorld::UniversalId::Type type)
|
||||||
{
|
{
|
||||||
std::unique_ptr<RecordBase> newRecord =
|
std::unique_ptr<RecordBase> newRecord = mData.getRecord(mData.searchId(origin)).modifiedCopy();
|
||||||
std::move(mData.getRecord(mData.searchId(origin)).modifiedCopy());
|
|
||||||
mAdapters.find(type)->second->setId(*newRecord, destination);
|
mAdapters.find(type)->second->setId(*newRecord, destination);
|
||||||
mData.insertRecord(std::move(newRecord), type, 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);
|
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(col), localIndex.second);
|
||||||
|
|
||||||
nestedAdapter.addNestedRow(&mColumns.at(col), mData, localIndex.first, position);
|
nestedAdapter.addNestedRow(&mColumns.at(col), mData, localIndex.first, position);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSMWorld::RefIdCollection::setNestedTable(int row, int column, const CSMWorld::NestedTableWrapperBase& nestedTable)
|
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);
|
const CSMWorld::NestedRefIdAdapterBase& nestedAdapter = getNestedAdapter(mColumns.at(column), localIndex.second);
|
||||||
|
|
||||||
nestedAdapter.setNestedTable(&mColumns.at(column), mData, localIndex.first, nestedTable);
|
nestedAdapter.setNestedTable(&mColumns.at(column), mData, localIndex.first, nestedTable);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CSMWorld::NestedTableWrapperBase* CSMWorld::RefIdCollection::nestedTable(int row, int column) const
|
CSMWorld::NestedTableWrapperBase* CSMWorld::RefIdCollection::nestedTable(int row, int column) const
|
||||||
|
|
Loading…
Reference in a new issue