Skip to content

Instantly share code, notes, and snippets.

@cmdcolin
Created March 29, 2016 14:10
Show Gist options
  • Save cmdcolin/bbc8d1d6adfa4f83ec62 to your computer and use it in GitHub Desktop.
Save cmdcolin/bbc8d1d6adfa4f83ec62 to your computer and use it in GitHub Desktop.
Potential patches to ea_utils to work with C++0x
9d8
< #include <functional>
32c31
< bool operator()(FILE* fp, const std::pair<std::tr1::reference_wrapper<const string>, std::tr1::reference_wrapper<const vector<annot> > > value) const {
---
> bool operator()(FILE* fp, const std::pair<const string&, const vector<annot> >& value) const {
35c34,35
< const unsigned char size = value.first.get().length();
---
> assert(value.first.length() <= UCHAR_MAX);
> const unsigned char size = value.first.length();
38c38
< if (fwrite(value.first.get().data(), size, 1, fp) != 1)
---
> if (fwrite(value.first.data(), size, 1, fp) != 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment