[x265] [PATCH] Use C++ true/false rather than Windows TRUE/FALSE
Rafaël Carré
funman at videolan.org
Wed Aug 28 17:57:06 CEST 2013
Hello,
Le 28/08/2013 14:46, chen a écrit :
> I use TRUE and FALSE is not a bug, because C++ 'bool' have different implement depends on compiler.
I understand.
If a specific value of TRUE and FALSE are needed for Windows, maybe you
can use: boolean == true ? TRUE : FALSE ?
> 在 2013-08-28 12:50:10,funman at videolan.org 写道:
>> # HG changeset patch
>> # User "Rafaël Carré <funman at videolan.org>
>> # Date 1377665234 -7200
>> # Node ID a5196f00d863c3599c0c4adb4ea3e2b1f3d913b3
>> # Parent 159d27a7c7d3c490385e6a79a1784e90ddb576be
>> Use C++ true/false rather than Windows TRUE/FALSE
>>
>> Fix build on Linux
>>
>> diff -r 159d27a7c7d3 -r a5196f00d863 source/encoder/framefilter.cpp
>> --- a/source/encoder/framefilter.cpp Wed Aug 28 09:18:24 2013 +0530
>> +++ b/source/encoder/framefilter.cpp Wed Aug 28 06:47:14 2013 +0200
>> @@ -36,7 +36,7 @@
>> : JobProvider(pool)
>> , m_cfg(NULL)
>> , m_pic(NULL)
>> - , active_lft(FALSE)
>> + , active_lft(false)
>> , m_entropyCoder(NULL)
>> , m_rdGoOnSbacCoder(NULL)
>> {}
>> @@ -59,7 +59,7 @@
>> bool FrameFilter::findJob()
>> {
>> // Check the lock
>> - if (ATOMIC_CAS32(&active_lft, FALSE, TRUE) == TRUE)
>> + if (ATOMIC_CAS32(&active_lft, false, true) == true)
>> return false;
>>
>> // NOTE: only one thread can be here
>> @@ -68,10 +68,10 @@
>> // NOTE: not need atom operator here because we lock before
>> row_done++;
>> processRow(row_done);
>> - active_lft = FALSE;
>> + active_lft = false;
>> return true;
>> }
>> - active_lft = FALSE;
>> + active_lft = false;
>> return false;
>> }
>>
>> @@ -102,7 +102,7 @@
>> m_loopFilter.setCfg(pic->getSlice()->getPPS()->getLoopFilterAcrossTilesEnabledFlag());
>> row_ready = -1;
>> row_done = -1;
>> - active_lft = FALSE;
>> + active_lft = false;
>> if (m_cfg->param.bEnableLoopFilter)
>> {
>> m_sao.resetStats();
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
More information about the x265-devel
mailing list