Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 2 g++ warnings #41

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/c++/api/buffer/BufferStreambuf.hh
Expand Up @@ -17,7 +17,7 @@
*/

#ifndef avro_BufferStreambuf_hh__
#define avro_BufferStreambuf_HH__
#define avro_BufferStreambuf_hh__

#include "Buffer.hh"

Expand Down
8 changes: 6 additions & 2 deletions lang/c++/test/AvrogencppTests.cc
Expand Up @@ -98,6 +98,11 @@ void setRecord(testgen::RootRecord &myRecord)
myRecord.bytes.push_back(20);
}

bool enumCompare(int lhs, int rhs)
{
return lhs == rhs;
}

template <typename T1, typename T2>
void checkRecord(const T1& r1, const T2& r2)
{
Expand All @@ -121,7 +126,7 @@ void checkRecord(const T1& r1, const T2& r2)
BOOST_CHECK_EQUAL(r1.bytes.size(), r2.bytes.size());
BOOST_CHECK_EQUAL_COLLECTIONS(r1.bytes.begin(), r1.bytes.end(),
r2.bytes.begin(), r2.bytes.end());
BOOST_CHECK_EQUAL(r1.myenum, r2.myenum);
BOOST_CHECK(enumCompare(r1.myenum, r2.myenum));
}

void checkDefaultValues(const testgen_r::RootRecord& r)
Expand All @@ -131,7 +136,6 @@ void checkDefaultValues(const testgen_r::RootRecord& r)
BOOST_CHECK_CLOSE(r.withDefaultValue.d1, 5.67, 1e-10);
}


void testEncoding()
{
ValidSchema s;
Expand Down