git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Traff type become an enumeration in scope of TARIFF.
[stg.git]
/
tests
/
test_bfstream.cpp
diff --git
a/tests/test_bfstream.cpp
b/tests/test_bfstream.cpp
index 595301b2b931e61bb0232e839cfa8f8df3def45c..f80dc8d856cd326c1fb2e086c43f54d6cf191ce4 100644
(file)
--- a/
tests/test_bfstream.cpp
+++ b/
tests/test_bfstream.cpp
@@
-15,7
+15,7
@@
class TRACKER
public:
TRACKER() : m_lastSize(0), m_callCount(0), m_lastBlock(NULL) {}
~TRACKER() { delete[] m_lastBlock; }
public:
TRACKER() : m_lastSize(0), m_callCount(0), m_lastBlock(NULL) {}
~TRACKER() { delete[] m_lastBlock; }
-
void
Call(const void * block, size_t size)
+
bool
Call(const void * block, size_t size)
{
delete[] m_lastBlock;
if (size > 0)
{
delete[] m_lastBlock;
if (size > 0)
@@
-27,6
+27,7
@@
class TRACKER
m_lastBlock = NULL;
m_lastSize = size;
++m_callCount;
m_lastBlock = NULL;
m_lastSize = size;
++m_callCount;
+ return true;
}
size_t LastSize() const { return m_lastSize; }
size_t CallCount() const { return m_callCount; }
}
size_t LastSize() const { return m_lastSize; }
size_t CallCount() const { return m_callCount; }
@@
-38,10
+39,10
@@
class TRACKER
char * m_lastBlock;
};
char * m_lastBlock;
};
-
void
Callback(const void * block, size_t size, void * data)
+
bool
Callback(const void * block, size_t size, void * data)
{
TRACKER & tracker = *static_cast<TRACKER *>(data);
{
TRACKER & tracker = *static_cast<TRACKER *>(data);
-tracker.Call(block, size);
+
return
tracker.Call(block, size);
}
}
}
}