clean warnings
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user