mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 14:41:04 -04:00
make image count more robust
This commit is contained in:
parent
5b19e994b5
commit
660be58cf2
1 changed files with 10 additions and 9 deletions
|
@ -39,19 +39,20 @@ RsWireGroup::RsWireGroup()
|
||||||
|
|
||||||
uint32_t RsWirePulse::ImageCount()
|
uint32_t RsWirePulse::ImageCount()
|
||||||
{
|
{
|
||||||
if (!mImage4.empty()) {
|
uint32_t images = 0;
|
||||||
return 4;
|
if (!mImage1.empty()) {
|
||||||
}
|
images++;
|
||||||
if (!mImage3.empty()) {
|
|
||||||
return 3;
|
|
||||||
}
|
}
|
||||||
if (!mImage2.empty()) {
|
if (!mImage2.empty()) {
|
||||||
return 2;
|
images++;
|
||||||
}
|
}
|
||||||
if (!mImage1.empty()) {
|
if (!mImage3.empty()) {
|
||||||
return 1;
|
images++;
|
||||||
}
|
}
|
||||||
return 0;
|
if (!mImage4.empty()) {
|
||||||
|
images++;
|
||||||
|
}
|
||||||
|
return images;
|
||||||
}
|
}
|
||||||
|
|
||||||
p3Wire::p3Wire(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs *gixs)
|
p3Wire::p3Wire(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs *gixs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue