Permalink
Browse files

fixed mingw failure to compile.

  • Loading branch information...
1 parent c5b0d34 commit 1633758e9d1ecdbfe9ffc443fe7fed68505eaabf @val-antonescu val-antonescu committed Jul 19, 2014
Showing with 1 addition and 50 deletions.
  1. +1 −1 VERSION
  2. +0 −11 ref_read.h
  3. +0 −38 word_io.h
View
@@ -1 +1 @@
-1.0.1
+2.0.0
View
@@ -75,17 +75,6 @@ struct RefRecord {
first = fgetc(in) ? true : false;
}
- RefRecord(int in, bool swap) {
- off = readU<TIndexOffU>(in, swap);
- len = readU<TIndexOffU>(in, swap);
- char c;
- if(!read(in, &c, 1)) {
- cerr << "Error reading RefRecord 'first' flag" << endl;
- throw 1;
- }
- first = (c ? true : false);
- }
-
void write(std::ostream& out, bool be) {
writeU<TIndexOffU>(out, off, be);
writeU<TIndexOffU>(out, len, be);
View
@@ -123,43 +123,5 @@ static inline T readI(FILE* in, bool swap) {
}
}
-template <typename T>
-static inline T readU(int in, bool swap) {
- T x;
- if(read(in, (void *)&x, sizeof(T)) != sizeof(T)) {
- assert(false);
- }
- if(swap) {
- if(sizeof(T) == 4) {
- return endianSwapU32(x);
- } else if(sizeof(T) == 8) {
- return endianSwapU64(x);
- } else {
- assert(false);
- }
- } else {
- return x;
- }
-}
-
-template <typename T>
-static inline T readI(int in, bool swap) {
- T x;
- if(read(in, (void *)&x, sizeof(T)) != sizeof(T)) {
- assert(false);
- }
- if(swap) {
- if(sizeof(T) == 4) {
- return endianSwapI32(x);
- } else if(sizeof(T) == 8) {
- return endianSwapI64(x);
- } else {
- assert(false);
- }
- } else {
- return x;
- }
-}
-
#endif /*WORD_IO_H_*/

0 comments on commit 1633758

Please sign in to comment.