remove redundant code.
This commit is contained in:
@ -35,22 +35,12 @@
|
|||||||
//#define WINDOWS_LEAN_AND_MEAN
|
//#define WINDOWS_LEAN_AND_MEAN
|
||||||
//#include <windows.h> // TIMER
|
//#include <windows.h> // TIMER
|
||||||
|
|
||||||
|
|
||||||
struct MyOutputHandler : public nvtt::OutputHandler
|
struct MyOutputHandler : public nvtt::OutputHandler
|
||||||
{
|
{
|
||||||
MyOutputHandler(const char * name) : total(0), progress(0), percentage(0), stream(new nv::StdOutputStream(name)) {}
|
MyOutputHandler(const char * name) : total(0), progress(0), percentage(0), stream(new nv::StdOutputStream(name)) {}
|
||||||
virtual ~MyOutputHandler() { delete stream; }
|
virtual ~MyOutputHandler() { delete stream; }
|
||||||
|
|
||||||
bool open(const char * name)
|
|
||||||
{
|
|
||||||
stream = new nv::StdOutputStream(name);
|
|
||||||
percentage = progress = 0;
|
|
||||||
if (stream->isError()) {
|
|
||||||
fprintf(stderr, "Error opening '%s' for writting\n", name);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void setTotal(int t)
|
virtual void setTotal(int t)
|
||||||
{
|
{
|
||||||
total = t;
|
total = t;
|
||||||
|
Reference in New Issue
Block a user