clean warnings

This commit is contained in:
2017-04-16 02:35:48 +02:00
parent 28fe61704f
commit 54082591f1
3 changed files with 4 additions and 5 deletions

View File

@@ -157,7 +157,7 @@ bool ui::BrushMesh::create()
ui::StrokeSample ui::Stroke::randomize_sample(const glm::vec2& pos, float pressure)
{
auto rnd_nor = [&] { return float((double)prng() / (double)prng.max()); }; // normalized [0, +1]
auto rnd_neg = [&] { return float((double)prng() / (double)prng.max() * 2.0 - 1.0); }; // normalized [-1, +1]
//auto rnd_neg = [&] { return float((double)prng() / (double)prng.max() * 2.0 - 1.0); }; // normalized [-1, +1]
auto rnd_rad = [&] { return float((double)prng() / (double)prng.max() * M_PI * 2.0); }; // normalized [0, 2pi]
auto rnd_vec = [&] { float rad = rnd_rad(); return glm::vec2(cosf(rad), sinf(rad)); }; // normalized direction vector

View File

@@ -16,7 +16,7 @@ bool Font::load(const char* ttf, int font_size)
LOG("Font::load loaded");
auto bitmap = std::make_unique<uint8_t[]>(w*h);
chars.resize(num_chars);
int ret = stbtt_BakeFontBitmap(file.m_data, 0, (float)font_size, bitmap.get(), w, h, start_char, num_chars, chars.data());
stbtt_BakeFontBitmap(file.m_data, 0, (float)font_size, bitmap.get(), w, h, start_char, num_chars, chars.data());
font_tex.create(w, h, GL_R8, GL_RED, bitmap.get());
file.close();
return true;

View File

@@ -813,7 +813,6 @@ public:
}
else
{
auto pos = ((MouseEvent*)e)->m_pos;
for (int i = 0; i < m_children.size(); i++)
{
if (m_children[i]->m_mouse_inside)
@@ -1703,7 +1702,7 @@ public:
}
virtual void init() override
{
const auto& m_template = (Node*)init_template("tpl-panel-color");
init_template("tpl-panel-color");
init_controls();
}
void init_controls()
@@ -1866,7 +1865,7 @@ public:
}
virtual void init() override
{
const auto& m_template = (Node*)init_template("tpl-panel-stroke");
init_template("tpl-panel-stroke");
init_controls();
}
void init_controls()