diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2024-03-12 01:19:14 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2024-03-14 00:11:47 +0300 |
commit | f7642b09c9e61f71e434aeb0ceb330d2ccaa25db (patch) | |
tree | 24caf3ca34bc91f4c3ea20b8fc436fdd71c44925 /src/tools/qgarray.cpp | |
parent | fa4475f36d6404a70d760ca95ac6a986a8846a3f (diff) | |
download | tqt3-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.tar.gz tqt3-f7642b09c9e61f71e434aeb0ceb330d2ccaa25db.zip |
TQT_THREAD_SUPPORT->!TQT_NO_THREAD: migrate sources
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src/tools/qgarray.cpp')
-rw-r--r-- | src/tools/qgarray.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/qgarray.cpp b/src/tools/qgarray.cpp index ff1f7b08b..7a741b308 100644 --- a/src/tools/qgarray.cpp +++ b/src/tools/qgarray.cpp @@ -52,9 +52,9 @@ #include <stdlib.h> #include <string.h> -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD # include <private/qmutexpool_p.h> -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD /* If USE_MALLOC isn't defined, we use new[] and delete[] to allocate @@ -733,10 +733,10 @@ void TQGArray::sort( uint sz ) if ( numItems < 2 ) return; -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD TQMutexLocker locker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &cmp_item_size ) : 0 ); -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD cmp_item_size = sz; qsort( shd->data, numItems, sz, cmp_arr ); @@ -752,10 +752,10 @@ int TQGArray::bsearch( const char *d, uint sz ) const if ( !numItems ) return -1; -#ifdef TQT_THREAD_SUPPORT +#ifndef TQT_NO_THREAD TQMutexLocker locker( tqt_global_mutexpool ? tqt_global_mutexpool->get( &cmp_item_size ) : 0 ); -#endif // TQT_THREAD_SUPPORT +#endif // TQT_NO_THREAD cmp_item_size = sz; char* r = (char*)::bsearch( d, shd->data, numItems, sz, cmp_arr ); |