summaryrefslogtreecommitdiff
path: root/winpipes.cpp
diff options
context:
space:
mode:
authorZireael <Zireael-N@users.noreply.github.com>2015-11-06 20:57:20 +0300
committerZireael <Zireael-N@users.noreply.github.com>2015-11-06 20:57:20 +0300
commit9b140da2725d2fce819eaf725f200d4459a25359 (patch)
tree65a08b2d3e3073f5ad250bb0c471441814990058 /winpipes.cpp
parent2fbdeb70b47025587b659642db0ffdeb66d995fb (diff)
downloadcryptopp-git-9b140da2725d2fce819eaf725f200d4459a25359.tar.gz
Override a pure virtual function inherited from WindowsPipe
Fixes "undefined reference to non-virtual thunk" when compiling cryptest.exe on MinGW.
Diffstat (limited to 'winpipes.cpp')
-rw-r--r--winpipes.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/winpipes.cpp b/winpipes.cpp
index 88cd168f..b1ec6d28 100644
--- a/winpipes.cpp
+++ b/winpipes.cpp
@@ -91,7 +91,7 @@ bool WindowsPipeReceiver::Receive(byte* buf, size_t bufLen)
{
assert(!m_resultPending && !m_eofReceived);
- HANDLE h = GetHandle();
+ const HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
if (ReadFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &m_lastResult, &m_overlapped))
{
@@ -128,7 +128,7 @@ unsigned int WindowsPipeReceiver::GetReceiveResult()
{
if (m_resultPending)
{
- HANDLE h = GetHandle();
+ const HANDLE h = GetHandle();
if (GetOverlappedResult(h, &m_overlapped, &m_lastResult, false))
{
if (m_lastResult == 0)
@@ -165,7 +165,7 @@ WindowsPipeSender::WindowsPipeSender()
void WindowsPipeSender::Send(const byte* buf, size_t bufLen)
{
DWORD written = 0;
- HANDLE h = GetHandle();
+ const HANDLE h = GetHandle();
// don't queue too much at once, or we might use up non-paged memory
if (WriteFile(h, buf, UnsignedMin((DWORD)128*1024, bufLen), &written, &m_overlapped))
{
@@ -193,7 +193,7 @@ unsigned int WindowsPipeSender::GetSendResult()
{
if (m_resultPending)
{
- HANDLE h = GetHandle();
+ const HANDLE h = GetHandle();
BOOL result = GetOverlappedResult(h, &m_overlapped, &m_lastResult, false);
CheckAndHandleError("GetOverlappedResult", result);
m_resultPending = false;