Add C++ operators

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2015-10-07 09:37:35 +02:00
parent f8c8222660
commit 04a0846fcb
1 changed files with 19 additions and 0 deletions

View File

@ -81,6 +81,25 @@ typedef enum
}
opj_stream_flag ;
#if defined(__cplusplus)
static inline opj_stream_flag operator |=(opj_stream_flag a, opj_stream_flag b)
{
return opj_stream_flag(int(a) | int(b));
}
static inline opj_stream_flag operator &=(opj_stream_flag a, opj_stream_flag b)
{
return opj_stream_flag(int(a) & int(b));
}
static inline opj_stream_flag operator ~(opj_stream_flag a)
{
return opj_stream_flag(~int(a));
}
#endif /* __cplusplus */
/**
Byte input-output stream.
*/