Fix for a possible compile error under OS X
This commit is contained in:
parent
a2a216ac56
commit
621d28adef
3 changed files with 140 additions and 132 deletions
|
@ -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) {
|
||||
|
||||
|
@ -108,7 +95,7 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
|
|||
}
|
||||
}
|
||||
|
||||
void phase2(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
void EditorHelpSearch::IncrementalSearch::phase2(Map<String, DocData::ClassDoc>::Element *E) {
|
||||
|
||||
DocData::ClassDoc &c = E->get();
|
||||
|
||||
|
@ -173,7 +160,7 @@ class EditorHelpSearch::IncrementalSearch : public Reference {
|
|||
}
|
||||
}
|
||||
|
||||
bool slice() {
|
||||
bool EditorHelpSearch::IncrementalSearch::slice() {
|
||||
|
||||
if (phase > 2)
|
||||
return true;
|
||||
|
@ -204,8 +191,7 @@ 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) {
|
||||
|
||||
|
@ -219,12 +205,12 @@ public:
|
|||
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;
|
||||
|
||||
|
@ -236,7 +222,6 @@ 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 a new issue