Remove PROTECT_VECTORS option since either program is correct without locking or it is not, especially since std::vector is definitely not thread-safe on all major platforms.

This commit is contained in:
Adam Reichold
2016-01-05 23:59:14 +01:00
parent 5883410354
commit 17d9309f1c
9 changed files with 11 additions and 215 deletions

View File

@@ -321,10 +321,7 @@ void ThumbBrowserEntryBase::getTextSizes (int& infow, int& infoh)
void ThumbBrowserEntryBase::resize (int h)
{
#if PROTECT_VECTORS
MYWRITERLOCK(l, lockRW);
#endif
height = h;
int old_preh = preh, old_width = width;
@@ -446,9 +443,7 @@ void ThumbBrowserEntryBase::draw ()
return;
}
#if PROTECT_VECTORS
MYREADERLOCK(l, lockRW); // No resizes, position moves etc. inbetween
#endif
int bbWidth, bbHeight;
@@ -486,10 +481,7 @@ void ThumbBrowserEntryBase::draw ()
void ThumbBrowserEntryBase::setPosition (int x, int y, int w, int h)
{
#if PROTECT_VECTORS
MYWRITERLOCK(l, lockRW);
#endif
exp_width = w;
exp_height = h;
@@ -503,10 +495,7 @@ void ThumbBrowserEntryBase::setPosition (int x, int y, int w, int h)
void ThumbBrowserEntryBase::setOffset (int x, int y)
{
#if PROTECT_VECTORS
MYWRITERLOCK(l, lockRW);
#endif
ofsX = -x;
ofsY = -y;