Skip to content

Commit

Permalink
fixed generics to pass unit-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Jul 23, 2013
1 parent 2809328 commit d53e415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/shogun/io/MemoryMappedFile.h
Expand Up @@ -42,6 +42,8 @@ template <class T> class CMemoryMappedFile : public CSGObject
address = NULL;
rw = 'r';
last_written_byte = 0;

set_generic<T>();
}

/** constructor
Expand Down Expand Up @@ -101,6 +103,8 @@ template <class T> class CMemoryMappedFile : public CSGObject
address = mmap(NULL, length, mmap_prot, mmap_flags, fd, 0);
if (address == MAP_FAILED)
SG_ERROR("Error mapping file")

set_generic<T>();
}

/** destructor */
Expand Down
2 changes: 2 additions & 0 deletions src/shogun/io/SimpleFile.h
Expand Up @@ -35,6 +35,8 @@ template <class T> class CSimpleFile : public CSGObject
file=NULL;
filename=strdup("");
status = false;

set_generic<T>();
}

/** constructor
Expand Down

0 comments on commit d53e415

Please sign in to comment.