All: Reformat according to new standard

This commit is contained in:
pre-commit-ci[bot]
2025-11-11 13:49:01 +01:00
committed by Kacper Donat
parent eafd18dac0
commit 25c3ba7338
2390 changed files with 154630 additions and 115818 deletions

View File

@@ -25,7 +25,7 @@
#include <QBuffer>
#include <QIODevice>
#ifdef __GNUC__
#include <cstdint>
# include <cstdint>
#endif
#include "Stream.h"
@@ -283,9 +283,8 @@ std::streamsize ByteArrayOStreambuf::xsputn(const char* s, std::streamsize num)
return _buffer->write(s, num);
}
std::streambuf::pos_type ByteArrayOStreambuf::seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type ByteArrayOStreambuf::
seekoff(std::streambuf::off_type off, std::ios_base::seekdir way, std::ios_base::openmode /*mode*/)
{
off_type endpos = 0;
off_type curpos = _buffer->pos();
@@ -312,8 +311,7 @@ std::streambuf::pos_type ByteArrayOStreambuf::seekoff(std::streambuf::off_type o
return {endpos};
}
std::streambuf::pos_type ByteArrayOStreambuf::seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type ByteArrayOStreambuf::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode /*mode*/)
{
return seekoff(pos, std::ios_base::beg);
}
@@ -361,9 +359,8 @@ std::streamsize ByteArrayIStreambuf::showmanyc()
return _end - _cur;
}
std::streambuf::pos_type ByteArrayIStreambuf::seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type ByteArrayIStreambuf::
seekoff(std::streambuf::off_type off, std::ios_base::seekdir way, std::ios_base::openmode /*mode*/)
{
int p_pos = -1;
if (way == std::ios_base::beg) {
@@ -389,8 +386,7 @@ std::streambuf::pos_type ByteArrayIStreambuf::seekoff(std::streambuf::off_type o
return ((p_pos + off) - _beg);
}
std::streambuf::pos_type ByteArrayIStreambuf::seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type ByteArrayIStreambuf::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode /*mode*/)
{
return seekoff(pos, std::ios_base::beg);
}
@@ -419,9 +415,8 @@ std::streamsize IODeviceOStreambuf::xsputn(const char* s, std::streamsize num)
return device->write(s, num);
}
std::streambuf::pos_type IODeviceOStreambuf::seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type IODeviceOStreambuf::
seekoff(std::streambuf::off_type off, std::ios_base::seekdir way, std::ios_base::openmode /*mode*/)
{
off_type endpos = 0;
off_type curpos = device->pos();
@@ -448,8 +443,7 @@ std::streambuf::pos_type IODeviceOStreambuf::seekoff(std::streambuf::off_type of
return {endpos};
}
std::streambuf::pos_type IODeviceOStreambuf::seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type IODeviceOStreambuf::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode /*mode*/)
{
return seekoff(pos, std::ios_base::beg);
}
@@ -459,9 +453,11 @@ std::streambuf::pos_type IODeviceOStreambuf::seekpos(std::streambuf::pos_type po
IODeviceIStreambuf::IODeviceIStreambuf(QIODevice* dev)
: device(dev)
{
setg(buffer + pbSize, // beginning of putback area
buffer + pbSize, // read position
buffer + pbSize); // end position
setg(
buffer + pbSize, // beginning of putback area
buffer + pbSize, // read position
buffer + pbSize
); // end position
}
IODeviceIStreambuf::~IODeviceIStreambuf() = default;
@@ -501,17 +497,18 @@ std::streambuf::int_type IODeviceIStreambuf::underflow()
}
// reset buffer pointers
setg(buffer + (pbSize - numPutback), // beginning of putback area
buffer + pbSize, // read position
buffer + pbSize + num); // end of buffer
setg(
buffer + (pbSize - numPutback), // beginning of putback area
buffer + pbSize, // read position
buffer + pbSize + num
); // end of buffer
// return next character
return *gptr();
}
std::streambuf::pos_type IODeviceIStreambuf::seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type IODeviceIStreambuf::
seekoff(std::streambuf::off_type off, std::ios_base::seekdir way, std::ios_base::openmode /*mode*/)
{
off_type endpos = 0;
off_type curpos = device->pos();
@@ -538,8 +535,7 @@ std::streambuf::pos_type IODeviceIStreambuf::seekoff(std::streambuf::off_type of
return {endpos};
}
std::streambuf::pos_type IODeviceIStreambuf::seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type IODeviceIStreambuf::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode /*mode*/)
{
return seekoff(pos, std::ios_base::beg);
}
@@ -718,9 +714,8 @@ std::streamsize PyStreambuf::xsputn(const char* s, std::streamsize num)
#endif
}
PyStreambuf::pos_type PyStreambuf::seekoff(PyStreambuf::off_type offset,
PyStreambuf::seekdir dir,
PyStreambuf::openmode /*mode*/)
PyStreambuf::pos_type PyStreambuf::
seekoff(PyStreambuf::off_type offset, PyStreambuf::seekdir dir, PyStreambuf::openmode /*mode*/)
{
int whence = 0;
switch (dir) {
@@ -806,9 +801,8 @@ std::streamsize Streambuf::showmanyc()
return _end - _cur;
}
std::streambuf::pos_type Streambuf::seekoff(std::streambuf::off_type off,
std::ios_base::seekdir way,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type Streambuf::
seekoff(std::streambuf::off_type off, std::ios_base::seekdir way, std::ios_base::openmode /*mode*/)
{
std::string::const_iterator p_pos;
if (way == std::ios_base::beg) {
@@ -834,8 +828,7 @@ std::streambuf::pos_type Streambuf::seekoff(std::streambuf::off_type off,
return ((p_pos + off) - _beg);
}
std::streambuf::pos_type Streambuf::seekpos(std::streambuf::pos_type pos,
std::ios_base::openmode /*mode*/)
std::streambuf::pos_type Streambuf::seekpos(std::streambuf::pos_type pos, std::ios_base::openmode /*mode*/)
{
return seekoff(pos, std::ios_base::beg);
}