1
0
Fork 0

uint -> unsigned int for MinGW

This commit is contained in:
Kevin Matz 2021-09-11 13:54:32 -04:00
parent 567e70d42b
commit ae2a03531b
7 changed files with 11 additions and 11 deletions

View File

@ -146,7 +146,7 @@ bool UniverseModel::setData(const QModelIndex &index, const QVariant &value,
{ {
if (!value.canConvert<uint>()) if (!value.canConvert<uint>())
return false; return false;
uint d = value.toUInt(); unsigned int d = value.toUInt();
if (d > 255) if (d > 255)
return false; return false;
data = d; data = d;
@ -157,7 +157,7 @@ bool UniverseModel::setData(const QModelIndex &index, const QVariant &value,
if (!value.canConvert<QString>()) if (!value.canConvert<QString>())
return false; return false;
bool ok; bool ok;
uint d = value.toString().toInt(&ok, 16); unsigned int d = value.toString().toInt(&ok, 16);
if (!ok || d > 255) if (!ok || d > 255)
return false; return false;
data = d; data = d;

View File

@ -182,7 +182,7 @@ void Pdu::iStream(Stream stream)
// length includes the flags, length, and vector. // length includes the flags, length, and vector.
// the remainder of the length of header and data // the remainder of the length of header and data
uint hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_; unsigned int hd_length = length - (flags_.hasLength ? 3 : 2) - vector_size_;
// abort if the remaining PDU length isn't available // abort if the remaining PDU length isn't available
if (!stream->good() || stream->available() < hd_length) if (!stream->good() || stream->available() < hd_length)

View File

@ -84,7 +84,7 @@ double Universe::rxRate()
* @brief milliseconds since the last update * @brief milliseconds since the last update
* @return * @return
*/ */
uint Universe::rxAge() unsigned int Universe::rxAge()
{ {
rx_timeout_(); rx_timeout_();
if (!rx_times_.size()) if (!rx_times_.size())

View File

@ -53,7 +53,7 @@ class Universe {
virtual uint8_t slot (const uint16_t); virtual uint8_t slot (const uint16_t);
virtual double rxRate(); virtual double rxRate();
virtual uint rxAge(); virtual unsigned int rxAge();
virtual void setValue (const uint16_t address, const uint8_t value); virtual void setValue (const uint16_t address, const uint8_t value);
virtual void setValue (const uint16_t start, const uint16_t footprint, virtual void setValue (const uint16_t start, const uint16_t footprint,

View File

@ -423,10 +423,10 @@ void Device::actionGetSupportedParameters(const MsgPtr message, MsgPtr response)
if (!message->requiredLength(0, response)) if (!message->requiredLength(0, response))
return; return;
uint count = parameters_.size(); unsigned int count = parameters_.size();
uint length = count * sizeof(PID); unsigned int length = count * sizeof(PID);
uint lastPage = length / 0xfe; unsigned int lastPage = length / 0xfe;
uint first = ack_overflow_page * ( 0xfe / sizeof(PID) ); unsigned int first = ack_overflow_page * ( 0xfe / sizeof(PID) );
if (first >= count) { if (first >= count) {
ack_overflow_page = 0; ack_overflow_page = 0;
first = 0; first = 0;

View File

@ -103,7 +103,7 @@ protected:
private: private:
Device* parent_; Device* parent_;
PID last_rx_pid_ = 0; PID last_rx_pid_ = 0;
uint ack_overflow_page = 0; unsigned int ack_overflow_page = 0;
uint8_t status_reporting_threshold_; uint8_t status_reporting_threshold_;
bool identifying_ = false; bool identifying_ = false;

View File

@ -425,7 +425,7 @@ void Universe::tx_loop_()
/// > (corresponding to DMX512-A slot data) shall be sent before the /// > (corresponding to DMX512-A slot data) shall be sent before the
/// > initiation of transmission suppression. /// > initiation of transmission suppression.
DMX::DimmerData last_null_data({0}); DMX::DimmerData last_null_data({0});
uint retransmission_count = 0; unsigned int retransmission_count = 0;
/// > 2. Thereafter, a single keep-alive packet shall be transmitted at /// > 2. Thereafter, a single keep-alive packet shall be transmitted at
/// > intervals of between 800mS and 1000mS. /// > intervals of between 800mS and 1000mS.