Merge pull request #16693 from marcelofg55/compile_fix
Fix for a possible compile error under OS X
This commit is contained in:
commit
133942cfeb
|
@ -37,7 +37,7 @@
|
|||
#define kOutputBus 0
|
||||
|
||||
#ifdef OSX_ENABLED
|
||||
static OSStatus outputDeviceAddressCB(AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *__nullable inClientData) {
|
||||
static OSStatus outputDeviceAddressCB(AudioObjectID inObjectID, UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses, void *inClientData) {
|
||||
AudioDriverCoreAudio *driver = (AudioDriverCoreAudio *)inClientData;
|
||||
|
||||
driver->reopen();
|
||||
|
|
|
@ -81,20 +81,7 @@ void EditorHelpSearch::_sbox_input(const Ref<InputEvent> &p_ie) {
|
|||
}
|
||||
}
|
||||
|
||||
class EditorHelpSearch::IncrementalSearch : public Reference {
|
||||
String term;
|
||||
TreeItem *root;
|
||||
|
||||
EditorHelpSearch *search;
|
||||
Tree *search_options;
|
||||
|
||||
DocData *doc;
|
||||
Ref<Texture> def_icon;
|
||||
|
||||
int phase;
|
||||
Map<String, DocData::ClassDoc>::Element *iterator;
|
||||
|
||||
void phase1(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
void EditorHelpSearch::IncrementalSearch::phase1(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
|
||||
if (E->key().findn(term) != -1) {
|
||||
|
||||
|
@ -106,9 +93,9 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
|
|||
else
|
||||
item->set_icon(0, def_icon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void phase2(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
void EditorHelpSearch::IncrementalSearch::phase2(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
|
||||
DocData::ClassDoc &c = E->get();
|
||||
|
||||
|
@ -171,9 +158,9 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
|
|||
item->set_icon(0, cicon);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool slice() {
|
||||
bool EditorHelpSearch::IncrementalSearch::slice() {
|
||||
|
||||
if (phase > 2)
|
||||
return true;
|
||||
|
@ -202,10 +189,9 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
|
|||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
IncrementalSearch(EditorHelpSearch *p_search, Tree *p_search_options, const String &p_term) :
|
||||
EditorHelpSearch::IncrementalSearch::IncrementalSearch(EditorHelpSearch *p_search, Tree *p_search_options, const String &p_term) :
|
||||
search(p_search),
|
||||
search_options(p_search_options) {
|
||||
|
||||
|
@ -217,14 +203,14 @@ public:
|
|||
root = search_options->create_item();
|
||||
phase = 0;
|
||||
iterator = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool empty() const {
|
||||
bool EditorHelpSearch::IncrementalSearch::empty() const {
|
||||
|
||||
return root->get_children() == NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool work(uint64_t slot = 1000000 / 10) {
|
||||
bool EditorHelpSearch::IncrementalSearch::work(uint64_t slot) {
|
||||
|
||||
const uint64_t until = OS::get_singleton()->get_ticks_usec() + slot;
|
||||
|
||||
|
@ -235,8 +221,7 @@ public:
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void EditorHelpSearch::_update_search() {
|
||||
search_options->clear();
|
||||
|
|
|
@ -54,7 +54,30 @@ class EditorHelpSearch : public ConfirmationDialog {
|
|||
Tree *search_options;
|
||||
String base_type;
|
||||
|
||||
class IncrementalSearch;
|
||||
class IncrementalSearch : public Reference {
|
||||
String term;
|
||||
TreeItem *root;
|
||||
|
||||
EditorHelpSearch *search;
|
||||
Tree *search_options;
|
||||
|
||||
DocData *doc;
|
||||
Ref<Texture> def_icon;
|
||||
|
||||
int phase;
|
||||
Map<String, DocData::ClassDoc>::Element *iterator;
|
||||
|
||||
void phase1(Map<String, DocData::ClassDoc>::Element *E);
|
||||
void phase2(Map<String, DocData::ClassDoc>::Element *E);
|
||||
bool slice();
|
||||
|
||||
public:
|
||||
IncrementalSearch(EditorHelpSearch *p_search, Tree *p_search_options, const String &p_term);
|
||||
|
||||
bool empty() const;
|
||||
bool work(uint64_t slot = 1000000 / 10);
|
||||
};
|
||||
|
||||
Ref<IncrementalSearch> search;
|
||||
|
||||
void _update_search();
|
||||
|
|
Loading…
Reference in New Issue