refs #345 Removed nonsense code (copy-paste mistake).

This commit is contained in:
Mathew Sutcliffe
2014-11-06 16:14:15 +00:00
parent 69e8ff1c5c
commit 8e5a9111bd

View File

@@ -216,36 +216,6 @@ namespace BlackMisc
this->m_i = jsonArray.at(2).toDouble();
}
/*
* To JSON
*/
template <class ImplMatrix, int Rows, int Columns> QJsonObject CMatrixBase<ImplMatrix, Rows, Columns>::toJson() const
{
QJsonObject json;
QJsonArray jsonArray;
foreach(double v, this->toList())
{
jsonArray.append(QJsonValue(v));
}
json.insert("matrix", QJsonValue(jsonArray));
return json;
}
/*
* From Json
*/
template <class ImplMatrix, int Rows, int Columns> void CMatrixBase<ImplMatrix, Rows, Columns>::convertFromJson(const QJsonObject &json)
{
QJsonArray jsonArray = json.value("matrix").toArray();
QList<double> list;
for (auto i = jsonArray.begin(); i != jsonArray.end(); ++i)
{
list.append((*i).toDouble());
}
this->fromList(list);
}
// see here for the reason of thess forward instantiations
// http://www.parashift.com/c++-faq/separate-template-class-defn-from-decl.html
template class CVector3DBase<CVector3D>;