/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
class ByteCounter
{
public:
- ByteCounter() : bytes(0), kb(0) {}
-
ByteCounter &operator +=(size_t v) {
bytes += v;
kb += (bytes >> 10);
}
public:
- size_t bytes;
- size_t kb;
+ size_t bytes = 0;
+ size_t kb = 0;
};
#endif /* SQUID_SRC_BYTECOUNTER_H */