mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
fix issue 301
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@356 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
289db34827
commit
b3b799c87a
@ -138,7 +138,7 @@ void* ScrollView::MessageReceiver(void* a) {
|
||||
cur->type);
|
||||
std::pair<ScrollView*, SVEventType> awaiting_list_any(cur->window,
|
||||
SVET_ANY);
|
||||
std::pair<ScrollView*, SVEventType> awaiting_list_any_window(NULL,
|
||||
std::pair<ScrollView*, SVEventType> awaiting_list_any_window((ScrollView*)0,
|
||||
SVET_ANY);
|
||||
waiting_for_events_mu->Lock();
|
||||
if (waiting_for_events.count(awaiting_list) > 0) {
|
||||
@ -430,7 +430,7 @@ SVEvent* ScrollView::AwaitEvent(SVEventType type) {
|
||||
SVSemaphore* sem = new SVSemaphore();
|
||||
std::pair<ScrollView*, SVEventType> ea(this, type);
|
||||
waiting_for_events_mu->Lock();
|
||||
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, NULL);
|
||||
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, (SVEvent*)0);
|
||||
waiting_for_events_mu->Unlock();
|
||||
// Wait on it, but first flush.
|
||||
stream_->Flush();
|
||||
@ -449,9 +449,9 @@ SVEvent* ScrollView::AwaitEvent(SVEventType type) {
|
||||
SVEvent* ScrollView::AwaitEventAnyWindow() {
|
||||
// Initialize the waiting semaphore.
|
||||
SVSemaphore* sem = new SVSemaphore();
|
||||
std::pair<ScrollView*, SVEventType> ea(NULL, SVET_ANY);
|
||||
std::pair<ScrollView*, SVEventType> ea((ScrollView*)0, SVET_ANY);
|
||||
waiting_for_events_mu->Lock();
|
||||
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, NULL);
|
||||
waiting_for_events[ea] = std::pair<SVSemaphore*, SVEvent*> (sem, (SVEvent*)0);
|
||||
waiting_for_events_mu->Unlock();
|
||||
// Wait on it.
|
||||
stream_->Flush();
|
||||
|
Loading…
Reference in New Issue
Block a user