Fixed some clang warnings

This commit is contained in:
Vojtech Bubnik 2021-02-09 19:23:58 +01:00
parent 770d8b5d08
commit 5e9a8ea700
17 changed files with 45 additions and 30 deletions

View file

@ -3553,7 +3553,7 @@ void GCodeViewer::render_toolpaths() const
}
#if ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS
auto render_sequential_range_cap = [this, set_uniform_color](const SequentialRangeCap& cap) {
auto render_sequential_range_cap = [set_uniform_color](const SequentialRangeCap& cap) {
GLShaderProgram* shader = wxGetApp().get_shader(cap.buffer->shader.c_str());
if (shader != nullptr) {
shader->start_using();

View file

@ -67,20 +67,20 @@
#include <imgui/imgui_internal.h>
static const float TRACKBALLSIZE = 0.8f;
static constexpr const float TRACKBALLSIZE = 0.8f;
static const float DEFAULT_BG_DARK_COLOR[3] = { 0.478f, 0.478f, 0.478f };
static const float DEFAULT_BG_LIGHT_COLOR[3] = { 0.753f, 0.753f, 0.753f };
static const float ERROR_BG_DARK_COLOR[3] = { 0.478f, 0.192f, 0.039f };
static const float ERROR_BG_LIGHT_COLOR[3] = { 0.753f, 0.192f, 0.039f };
//static const float AXES_COLOR[3][3] = { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } };
static constexpr const float DEFAULT_BG_DARK_COLOR[3] = { 0.478f, 0.478f, 0.478f };
static constexpr const float DEFAULT_BG_LIGHT_COLOR[3] = { 0.753f, 0.753f, 0.753f };
static constexpr const float ERROR_BG_DARK_COLOR[3] = { 0.478f, 0.192f, 0.039f };
static constexpr const float ERROR_BG_LIGHT_COLOR[3] = { 0.753f, 0.192f, 0.039f };
//static constexpr const float AXES_COLOR[3][3] = { { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f } };
// Number of floats
static const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
static constexpr const size_t MAX_VERTEX_BUFFER_SIZE = 131072 * 6; // 3.15MB
// Reserve size in number of floats.
static const size_t VERTEX_BUFFER_RESERVE_SIZE = 131072 * 2; // 1.05MB
static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE = 131072 * 2; // 1.05MB
// Reserve size in number of floats, maximum sum of all preallocated buffers.
static const size_t VERTEX_BUFFER_RESERVE_SIZE_SUM_MAX = 1024 * 1024 * 128 / 4; // 128MB
static constexpr const size_t VERTEX_BUFFER_RESERVE_SIZE_SUM_MAX = 1024 * 1024 * 128 / 4; // 128MB
namespace Slic3r {
namespace GUI {
@ -1180,7 +1180,7 @@ GLCanvas3D::GLCanvas3D(wxGLCanvas* canvas)
#endif // ENABLE_RENDER_PICKING_PASS
, m_render_sla_auxiliaries(true)
, m_labels(*this)
, m_slope(*this, m_volumes)
, m_slope(m_volumes)
{
if (m_canvas != nullptr) {
m_timer.SetOwner(m_canvas);

View file

@ -394,11 +394,10 @@ class GLCanvas3D
class Slope
{
bool m_enabled{ false };
GLCanvas3D& m_canvas;
GLVolumeCollection& m_volumes;
static float s_window_width;
public:
Slope(GLCanvas3D& canvas, GLVolumeCollection& volumes) : m_canvas(canvas), m_volumes(volumes) {}
Slope(GLVolumeCollection& volumes) : m_volumes(volumes) {}
void enable(bool enable) { m_enabled = enable; }
bool is_enabled() const { return m_enabled; }

View file

@ -203,6 +203,7 @@ namespace search_for_drives_internal
}
}
#if 0
static void search_path(const std::string &path, const std::string &parent_path, std::vector<DriveData> &out)
{
glob_t globbuf;
@ -217,6 +218,7 @@ namespace search_for_drives_internal
}
globfree(&globbuf);
}
#endif
}
std::vector<DriveData> RemovableDriveManager::search_for_removable_drives() const

View file

@ -18,7 +18,9 @@ public:
float get_scale_factor();
private:
#ifdef __WXGTK3__
wxWindow* m_window;
#endif // __WXGTK3__
void* m_self;
};

View file

@ -11,8 +11,7 @@
namespace Slic3r {
namespace GUI {
RetinaHelper::RetinaHelper(wxWindow* window) :
m_window(window)
RetinaHelper::RetinaHelper(wxWindow*)
{
m_self = nullptr;
m_self = [[RetinaHelperImpl alloc] initWithView:window->GetHandle() handler:window->GetEventHandler()];