update color at picking and cleanup code from some warnings

This commit is contained in:
2019-03-11 15:35:59 +01:00
parent 373e7ad0e9
commit fda399f7dd
16 changed files with 56 additions and 63 deletions

View File

@@ -68,7 +68,7 @@ public:
}
virtual void write(BinaryStreamWriter& w) const override
{
w.wi32(items.size());
w.wi32((int)items.size());
for (auto& i : items)
i->write(w);
}
@@ -412,7 +412,7 @@ public:
{
w.wwstring(name);
w.wkey_or_string(class_id);
w.wu32(props.size());
w.wu32((int)props.size());
for (auto& p : props)
{
w.wkey_or_string(p.first);
@@ -518,7 +518,7 @@ public:
auto decoded = r.rrle(sl);
data.insert(data.end(), decoded.begin(), decoded.end());
}
auto len = r.pos() - start;
//auto len = r.pos() - start;
}
else
{
@@ -541,7 +541,7 @@ public:
VMArray(uint32_t version, const Rectangle& rect) : version(version), rect(rect) { }
std::shared_ptr<Image> image(bool grayscale, bool invert) const
{
int nc = channels.size();
int nc = (int)channels.size();
auto pixels = (channels[0].depth >> 3) * rect.area();
if (nc == 1 || nc >= 3)
{
@@ -589,7 +589,7 @@ public:
}
else
{
LOG("Error image with %d channels\n", channels.size());
LOG("Error image with %ld channels\n", channels.size());
}
return nullptr;
}