Inline static variables (part 1)
This commit is contained in:
parent
67c96c89cc
commit
5af4bef46f
52 changed files with 85 additions and 247 deletions
|
|
@ -51,12 +51,6 @@
|
|||
#include "scene/gui/texture_rect.h"
|
||||
#include "servers/display_server.h"
|
||||
|
||||
EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func = nullptr;
|
||||
EditorFileDialog::GetIconFunc EditorFileDialog::get_thumbnail_func = nullptr;
|
||||
|
||||
EditorFileDialog::RegisterFunc EditorFileDialog::register_func = nullptr;
|
||||
EditorFileDialog::RegisterFunc EditorFileDialog::unregister_func = nullptr;
|
||||
|
||||
void EditorFileDialog::_native_popup() {
|
||||
// Show native dialog directly.
|
||||
String root;
|
||||
|
|
@ -1983,10 +1977,6 @@ void EditorFileDialog::_go_forward() {
|
|||
dir_next->set_disabled(local_history_pos == local_history.size() - 1);
|
||||
}
|
||||
|
||||
bool EditorFileDialog::default_show_hidden_files = false;
|
||||
|
||||
EditorFileDialog::DisplayMode EditorFileDialog::default_display_mode = DISPLAY_THUMBNAILS;
|
||||
|
||||
void EditorFileDialog::set_display_mode(DisplayMode p_mode) {
|
||||
if (display_mode == p_mode) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -72,10 +72,10 @@ public:
|
|||
typedef Ref<Texture2D> (*GetIconFunc)(const String &);
|
||||
typedef void (*RegisterFunc)(EditorFileDialog *);
|
||||
|
||||
static GetIconFunc get_icon_func;
|
||||
static GetIconFunc get_thumbnail_func;
|
||||
static RegisterFunc register_func;
|
||||
static RegisterFunc unregister_func;
|
||||
static inline GetIconFunc get_icon_func = nullptr;
|
||||
static inline GetIconFunc get_thumbnail_func = nullptr;
|
||||
static inline RegisterFunc register_func = nullptr;
|
||||
static inline RegisterFunc unregister_func = nullptr;
|
||||
|
||||
private:
|
||||
enum ItemMenu {
|
||||
|
|
@ -159,8 +159,8 @@ private:
|
|||
int preview_wheel_index = 0;
|
||||
float preview_wheel_timeout = 0.0f;
|
||||
|
||||
static bool default_show_hidden_files;
|
||||
static DisplayMode default_display_mode;
|
||||
static inline bool default_show_hidden_files = false;
|
||||
static inline DisplayMode default_display_mode = DISPLAY_THUMBNAILS;
|
||||
bool show_hidden_files;
|
||||
DisplayMode display_mode;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue