]> git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreIOState.cc
Cleanup: fix most 'unused parameter' warnings
[thirdparty/squid.git] / src / StoreIOState.cc
1 /*
2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: section 20 Swap Dir base object */
10
11 #include "squid.h"
12 #include "Debug.h"
13 #include "defines.h"
14 #include "StoreIOState.h"
15
16 void *
17 StoreIOState::operator new (size_t)
18 {
19 assert(0);
20 return (void *)1;
21 }
22
23 void
24 StoreIOState::operator delete (void *)
25 {
26 assert(0);
27 }
28
29 StoreIOState::StoreIOState() :
30 swap_dirn(-1), swap_filen(-1), e(NULL), mode(O_BINARY),
31 offset_(0), file_callback(NULL), callback(NULL), callback_data(NULL)
32 {
33 read.callback = NULL;
34 read.callback_data = NULL;
35 flags.closing = false;
36 }
37
38 off_t
39 StoreIOState::offset() const
40 {
41 return offset_;
42 }
43
44 StoreIOState::~StoreIOState()
45 {
46 debugs(20,3, "StoreIOState::~StoreIOState: " << this);
47
48 if (read.callback_data)
49 cbdataReferenceDone(read.callback_data);
50
51 if (callback_data)
52 cbdataReferenceDone(callback_data);
53 }
54