mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
refs #92 fixing warnings when compiling for 64bits due to conversions between size_t and int
This commit is contained in:
@@ -402,7 +402,7 @@ namespace BlackCore
|
||||
// I could send the same message to n frequencies in one step
|
||||
// if this is really required, I need to group by message
|
||||
// currently I send individual messages
|
||||
std::vector<INT> freqsVec;
|
||||
QVector<INT> freqsVec;
|
||||
freqsVec.push_back(message.getFrequency().value(CFrequencyUnit::kHz()));
|
||||
m_net->SendRadioTextMessage(freqsVec.size(), freqsVec.data(), toFSD(message.getMessage()));
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
const CPluginManager::PluginEntry &CPluginManager::getEntry(size_t index) const
|
||||
const CPluginManager::PluginEntry &CPluginManager::getEntry(int index) const
|
||||
{
|
||||
Q_ASSERT_X(index < getPluginCount(), "Plugin manager", "Plugin index out of bounds");
|
||||
|
||||
@@ -80,17 +80,17 @@ namespace BlackCore
|
||||
return entry;
|
||||
}
|
||||
|
||||
const QString CPluginManager::getName(size_t index) const
|
||||
const QString CPluginManager::getName(int index) const
|
||||
{
|
||||
return getFactory(index)->getName();
|
||||
}
|
||||
|
||||
const QString CPluginManager::getDescription(size_t index) const
|
||||
const QString CPluginManager::getDescription(int index) const
|
||||
{
|
||||
return getFactory(index)->getDescription();
|
||||
}
|
||||
|
||||
BlackMisc::IPlugin *CPluginManager::constructPlugin(size_t index)
|
||||
BlackMisc::IPlugin *CPluginManager::constructPlugin(int index)
|
||||
{
|
||||
BlackMisc::IPlugin *plugin = getFactory(index)->create(BlackMisc::IContext::getInstance());
|
||||
if (! plugin->isValid())
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace BlackCore
|
||||
Return the total number of plugins loaded so far.
|
||||
\return
|
||||
*/
|
||||
size_t getPluginCount() const
|
||||
int getPluginCount() const
|
||||
{
|
||||
return m_plugins.size();
|
||||
}
|
||||
@@ -55,14 +55,14 @@ namespace BlackCore
|
||||
\param index the plugin's index in the vector of plugins.
|
||||
\return
|
||||
*/
|
||||
const QString getName(size_t index) const;
|
||||
const QString getName(int index) const;
|
||||
|
||||
/*!
|
||||
Return the description of a plugin.
|
||||
\param index the plugin's index in the vector of plugins.
|
||||
\return
|
||||
*/
|
||||
const QString getDescription(size_t index) const;
|
||||
const QString getDescription(int index) const;
|
||||
|
||||
/*!
|
||||
Construct a plugin.
|
||||
@@ -70,14 +70,14 @@ namespace BlackCore
|
||||
\return a pointer to the newly created plugin.
|
||||
\warning You must release this pointer with IPluginFactory::destroy().
|
||||
*/
|
||||
BlackMisc::IPlugin *constructPlugin(size_t index);
|
||||
BlackMisc::IPlugin *constructPlugin(int index);
|
||||
|
||||
/*!
|
||||
Direct access to the factory. You don't usually need this.
|
||||
\param index
|
||||
\return
|
||||
*/
|
||||
BlackMisc::IPluginFactory *getFactory(size_t index)
|
||||
BlackMisc::IPluginFactory *getFactory(int index)
|
||||
{
|
||||
return const_cast<BlackMisc::IPluginFactory*>(static_cast<const CPluginManager*>(this)->getFactory(index));
|
||||
}
|
||||
@@ -87,7 +87,7 @@ namespace BlackCore
|
||||
\param index
|
||||
\return
|
||||
*/
|
||||
const BlackMisc::IPluginFactory *getFactory(size_t index) const
|
||||
const BlackMisc::IPluginFactory *getFactory(int index) const
|
||||
{
|
||||
return getEntry(index).factory;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace BlackCore
|
||||
\param index
|
||||
\return
|
||||
*/
|
||||
QPluginLoader *getLoader(size_t index)
|
||||
QPluginLoader *getLoader(int index)
|
||||
{
|
||||
return const_cast<QPluginLoader*>(static_cast<const CPluginManager*>(this)->getLoader(index));
|
||||
}
|
||||
@@ -107,7 +107,7 @@ namespace BlackCore
|
||||
\param index
|
||||
\return
|
||||
*/
|
||||
const QPluginLoader *getLoader(size_t index) const
|
||||
const QPluginLoader *getLoader(int index) const
|
||||
{
|
||||
return getEntry(index).loader.data();
|
||||
}
|
||||
@@ -123,12 +123,12 @@ namespace BlackCore
|
||||
|
||||
QVector<PluginEntry> m_plugins;
|
||||
|
||||
PluginEntry &getEntry(size_t index)
|
||||
PluginEntry &getEntry(int index)
|
||||
{
|
||||
return const_cast<PluginEntry&>(static_cast<const CPluginManager*>(this)->getEntry(index));
|
||||
}
|
||||
|
||||
const PluginEntry &getEntry(size_t index) const;
|
||||
const PluginEntry &getEntry(int index) const;
|
||||
};
|
||||
|
||||
} // namespace BlackCore
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Get element by column / row
|
||||
*/
|
||||
template<class ImplMatrix, int Rows, int Columns> double CMatrixBase<ImplMatrix, Rows, Columns>::getElement(size_t row, size_t column) const
|
||||
template<class ImplMatrix, int Rows, int Columns> double CMatrixBase<ImplMatrix, Rows, Columns>::getElement(int row, int column) const
|
||||
{
|
||||
this->checkRange(row, column);
|
||||
return this->m_matrix(row, column);
|
||||
@@ -25,7 +25,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Set element by column / row
|
||||
*/
|
||||
template<class ImplMatrix, int Rows, int Columns> void CMatrixBase<ImplMatrix, Rows, Columns>::setElement(size_t row, size_t column, double value)
|
||||
template<class ImplMatrix, int Rows, int Columns> void CMatrixBase<ImplMatrix, Rows, Columns>::setElement(int row, int column, double value)
|
||||
{
|
||||
this->checkRange(row, column);
|
||||
this->m_matrix(row, column) = value;
|
||||
@@ -34,7 +34,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Check range
|
||||
*/
|
||||
template<class ImplMatrix, int Rows, int Columns> void CMatrixBase<ImplMatrix, Rows, Columns>::checkRange(size_t row, size_t column) const
|
||||
template<class ImplMatrix, int Rows, int Columns> void CMatrixBase<ImplMatrix, Rows, Columns>::checkRange(int row, int column) const
|
||||
{
|
||||
bool valid = (row < Rows && column < Columns);
|
||||
Q_ASSERT_X(valid, "getElement()", "Row or column invalid");
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace BlackMisc
|
||||
* \param column
|
||||
* \return
|
||||
*/
|
||||
double getElement(size_t row, size_t column) const;
|
||||
double getElement(int row, int column) const;
|
||||
|
||||
/*!
|
||||
* \brief Get element
|
||||
@@ -332,7 +332,7 @@ namespace BlackMisc
|
||||
* \param column
|
||||
* \param value
|
||||
*/
|
||||
void setElement(size_t row, size_t column, double value);
|
||||
void setElement(int row, int column, double value);
|
||||
|
||||
/*!
|
||||
* \brief Get element by operator () modifying
|
||||
@@ -340,7 +340,7 @@ namespace BlackMisc
|
||||
* \param column
|
||||
* \return
|
||||
*/
|
||||
double &operator()(size_t row, size_t column)
|
||||
double &operator()(int row, int column)
|
||||
{
|
||||
this->checkRange(row, column);
|
||||
return this->m_matrix(row, column);
|
||||
@@ -352,7 +352,7 @@ namespace BlackMisc
|
||||
* \param column
|
||||
* \return
|
||||
*/
|
||||
double operator()(size_t row, size_t column) const
|
||||
double operator()(int row, int column) const
|
||||
{
|
||||
return this->getElement(row, column);
|
||||
}
|
||||
@@ -369,7 +369,7 @@ namespace BlackMisc
|
||||
* \param column
|
||||
* \throws std::range_error if index out of bounds
|
||||
*/
|
||||
void checkRange(size_t row, size_t column) const;
|
||||
void checkRange(int row, int column) const;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Element (return by reference)
|
||||
*/
|
||||
template <class ImplVector> double &CVector3DBase<ImplVector>::getElement(size_t row)
|
||||
template <class ImplVector> double &CVector3DBase<ImplVector>::getElement(int row)
|
||||
{
|
||||
switch (row)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Element
|
||||
*/
|
||||
template <class ImplVector> double CVector3DBase<ImplVector>::getElement(size_t row) const
|
||||
template <class ImplVector> double CVector3DBase<ImplVector>::getElement(int row) const
|
||||
{
|
||||
return const_cast<CVector3DBase<ImplVector>*>(this)->getElement(row);
|
||||
}
|
||||
@@ -108,7 +108,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Set given element
|
||||
*/
|
||||
template <class ImplVector> void CVector3DBase<ImplVector>::setElement(size_t row, double value)
|
||||
template <class ImplVector> void CVector3DBase<ImplVector>::setElement(int row, double value)
|
||||
{
|
||||
switch (row)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace BlackMisc
|
||||
* \param row
|
||||
* \return Mutable reference
|
||||
*/
|
||||
double &getElement(size_t row);
|
||||
double &getElement(int row);
|
||||
|
||||
/*!
|
||||
* \brief String for converter
|
||||
@@ -152,28 +152,28 @@ namespace BlackMisc
|
||||
* \param row
|
||||
* \return
|
||||
*/
|
||||
double getElement(size_t row) const;
|
||||
double getElement(int row) const;
|
||||
|
||||
/*!
|
||||
* \brief Set element
|
||||
* \param row
|
||||
* \param value
|
||||
*/
|
||||
void setElement(size_t row, double value);
|
||||
void setElement(int row, double value);
|
||||
|
||||
/*!
|
||||
* \brief Operator []
|
||||
* \param row
|
||||
* \return
|
||||
*/
|
||||
double operator[](size_t row) const { return this->getElement(row); }
|
||||
double operator[](int row) const { return this->getElement(row); }
|
||||
|
||||
/*!
|
||||
* \brief Operator []
|
||||
* \param row
|
||||
* \return Mutable reference
|
||||
*/
|
||||
double &operator[](size_t row) { return this->getElement(row); }
|
||||
double &operator[](int row) { return this->getElement(row); }
|
||||
|
||||
/*!
|
||||
* \brief Equal operator ==
|
||||
|
||||
Reference in New Issue
Block a user