summaryrefslogtreecommitdiff
path: root/zen/serialize.h
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/serialize.h
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2
FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip
Merge branch '11.7' into 'master'11.7
add upstream 11.7 See merge request opensource-tracking/FreeFileSync!31
Diffstat (limited to 'zen/serialize.h')
-rw-r--r--zen/serialize.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/zen/serialize.h b/zen/serialize.h
index 6c57e4ee..f9677630 100644
--- a/zen/serialize.h
+++ b/zen/serialize.h
@@ -35,7 +35,7 @@ struct BufferedInputStream
Optional: support stream-copying
--------------------------------
size_t getBlockSize() const;
- const IOCallback& notifyUnbufferedIO
+ const IoCallback& notifyUnbufferedIO
};
--------------------------------
@@ -47,9 +47,9 @@ struct BufferedOutputStream
Optional: support stream-copying
--------------------------------
- const IOCallback& notifyUnbufferedIO
+ const IoCallback& notifyUnbufferedIO
}; */
-using IOCallback = std::function<void(int64_t bytesDelta)>; //throw X
+using IoCallback = std::function<void(int64_t bytesDelta)>; //throw X
//functions based on buffered stream abstraction
@@ -75,7 +75,7 @@ template < class BufferedInputStream> void readArray (BufferedInputSt
struct IOCallbackDivider
{
- IOCallbackDivider(const IOCallback& notifyUnbufferedIO, int64_t& totalUnbufferedIO) : totalUnbufferedIO_(totalUnbufferedIO), notifyUnbufferedIO_(notifyUnbufferedIO) {}
+ IOCallbackDivider(const IoCallback& notifyUnbufferedIO, int64_t& totalUnbufferedIO) : totalUnbufferedIO_(totalUnbufferedIO), notifyUnbufferedIO_(notifyUnbufferedIO) {}
void operator()(int64_t bytesDelta)
{
@@ -85,7 +85,7 @@ struct IOCallbackDivider
private:
int64_t& totalUnbufferedIO_;
- const IOCallback& notifyUnbufferedIO_;
+ const IoCallback& notifyUnbufferedIO_;
};
@@ -206,7 +206,7 @@ void writeArray(BufferedOutputStream& stream, const void* buffer, size_t len)
template <class N, class BufferedOutputStream> inline
void writeNumber(BufferedOutputStream& stream, const N& num)
{
- static_assert(IsArithmetic<N>::value || std::is_same_v<N, bool> || std::is_enum_v<N>);
+ static_assert(IsArithmeticV<N> || std::is_same_v<N, bool> || std::is_enum_v<N>);
writeArray(stream, &num, sizeof(N));
}
@@ -234,7 +234,7 @@ void readArray(BufferedInputStream& stream, void* buffer, size_t len) //throw Sy
template <class N, class BufferedInputStream> inline
N readNumber(BufferedInputStream& stream) //throw SysErrorUnexpectedEos
{
- static_assert(IsArithmetic<N>::value || std::is_same_v<N, bool> || std::is_enum_v<N>);
+ static_assert(IsArithmeticV<N> || std::is_same_v<N, bool> || std::is_enum_v<N>);
N num{};
readArray(stream, &num, sizeof(N)); //throw SysErrorUnexpectedEos
return num;
bgstack15