update Xcode project, fix some warnings, update android icons, ignore unrecognized files in the doc browser

This commit is contained in:
2018-09-22 23:21:39 +02:00
parent 3191730c31
commit c6f8bf7b9f
25 changed files with 33 additions and 22 deletions

View File

@@ -799,7 +799,7 @@ void ui::Canvas::layer_remove(int idx) // m_order index
i--;
m_layers.erase(m_layers.begin() + n);
m_order.erase(m_order.begin() + idx);
m_current_layer_idx = m_order[std::min<int>(m_layers.size() - 1, idx)];
m_current_layer_idx = m_order[std::min<int>((int)m_layers.size() - 1, idx)];
}
void ui::Canvas::layer_order(int idx, int pos) // m_order index
{
@@ -1283,8 +1283,8 @@ void ui::Canvas::inject_xmp(std::string jpg_path)
unsigned char* xmp_section = (unsigned char*)malloc(sizeof(xmp) + 4);
xmp_section[0] = 0xff;
xmp_section[1] = 0xe1;
xmp_section[2] = ((int)sizeof(xmp) + 2) >> 8;
xmp_section[3] = ((int)sizeof(xmp) + 2) >> 0;
xmp_section[2] = (uint8_t)((int)sizeof(xmp) + 2) >> 8;
xmp_section[3] = (uint8_t)((int)sizeof(xmp) + 2) >> 0;
memcpy(xmp_section + 4, xmp, sizeof(xmp));
fwrite(jpeg_data, 1, i, fp);
@@ -1843,7 +1843,7 @@ ui::Image ui::Canvas::thumbnail_generate(int w, int h)
glClearColor(cc[0], cc[1], cc[2], cc[3]);
glActiveTexture(GL_TEXTURE0);
return std::move(image);
return image;
}
ui::Image ui::Canvas::thumbnail_read(std::string data_path)
@@ -1870,7 +1870,7 @@ ui::Image ui::Canvas::thumbnail_read(std::string data_path)
fread((uint8_t*)thumb.data(), thumb.size(), 1, fp);
fclose(fp);
LOG("project thumbnail read from %s", data_path.c_str());
return std::move(thumb);
return thumb;
}
void ui::Canvas::draw_objects(std::function<void(const glm::mat4& camera, const glm::mat4& proj, int i)> observer, Layer& layer)
@@ -2016,7 +2016,7 @@ std::vector<ui::Shape::vertex_t> ui::Canvas::triangulate(const std::vector<std::
node = node->end ? nullptr : node->next;
current->next = nullptr;
}
LOG("poly %ld", outline.size());
LOG("poly %zu", outline.size());
if (outline.size() > 2)
{
@@ -2101,7 +2101,7 @@ ui::Layer::Snapshot ui::Layer::snapshot(std::string data_path)
//int ret = stbi_write_png(name, m_rtt[i].getWidth(), m_rtt[i].getHeight(), 4, snap.image[i].get(), m_rtt[i].stride());
}
counter++;
return std::move(snap);
return snap;
}
void ui::Layer::clear(const glm::vec4& c)