summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx/Text.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-27 19:30:30 +0200
committerAki <please@ignore.pl>2022-03-27 19:30:30 +0200
commit2ba515370864b85bd29b0d23083248c74a868691 (patch)
treeed2252bb9ea2343f3b9932f5906e59ca828d24b7 /FoundationEx/Text.cpp
parenta12e588079700d55a0b788fea2df7727c2e41f52 (diff)
downloadstarshatter-2ba515370864b85bd29b0d23083248c74a868691.zip
starshatter-2ba515370864b85bd29b0d23083248c74a868691.tar.gz
starshatter-2ba515370864b85bd29b0d23083248c74a868691.tar.bz2
Replaced own ThreadSync with atomic variable in Text
Diffstat (limited to 'FoundationEx/Text.cpp')
-rw-r--r--FoundationEx/Text.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/FoundationEx/Text.cpp b/FoundationEx/Text.cpp
index e73149a..972db7f 100644
--- a/FoundationEx/Text.cpp
+++ b/FoundationEx/Text.cpp
@@ -33,8 +33,6 @@ TextRep::TextRep()
// +-------------------------------------------------------------------+
-ThreadSync TextRep::sync;
-
TextRep::TextRep(const char* s)
: ref(1), length(0), sensitive(true)
@@ -101,17 +99,13 @@ TextRep::~TextRep()
void
TextRep::addref()
{
- sync.acquire();
ref++;
- sync.release();
}
long
TextRep::deref()
{
- sync.acquire();
long r = --ref;
- sync.release();
return r;
}