mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
fix: cast InterlockedCompareExchangeRelease64 args in storage classes
This commit is contained in:
parent
22b97a4dc0
commit
d75e0570b0
|
|
@ -407,7 +407,7 @@ void SparseDataStorage::addNewPlane(int y)
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 == lastDataAndCount )
|
if( lastDataAndCount2 == lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
@ -485,7 +485,7 @@ void SparseDataStorage::updateDataAndCount(__int64 newDataAndCount)
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 == lastDataAndCount )
|
if( lastDataAndCount2 == lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
@ -564,7 +564,7 @@ int SparseDataStorage::compress()
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 != lastDataAndCount )
|
if( lastDataAndCount2 != lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -413,7 +413,7 @@ void SparseLightStorage::addNewPlane(int y)
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 == lastDataAndCount )
|
if( lastDataAndCount2 == lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
@ -491,7 +491,7 @@ void SparseLightStorage::updateDataAndCount(__int64 newDataAndCount)
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 == lastDataAndCount )
|
if( lastDataAndCount2 == lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
@ -581,7 +581,7 @@ int SparseLightStorage::compress()
|
||||||
|
|
||||||
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
// Attempt to update the data & count atomically. This command will Only succeed if the data stored at
|
||||||
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
// dataAndCount is equal to lastDataAndCount, and will return the value present just before the write took place
|
||||||
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( &dataAndCount, newDataAndCount, lastDataAndCount );
|
__int64 lastDataAndCount2 = InterlockedCompareExchangeRelease64( (LONG64 *)&dataAndCount, newDataAndCount, lastDataAndCount );
|
||||||
|
|
||||||
if( lastDataAndCount2 != lastDataAndCount )
|
if( lastDataAndCount2 != lastDataAndCount )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue