Skip to content

Commit 208df18

Browse files
IQ Tool: remove unused code
1 parent 0072901 commit 208df18

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/interfaces/file_source.cpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,6 @@ int file_source::work(int noutput_items,
375375
{
376376
char* o = (char*)output_items[0];
377377
uint64_t size = noutput_items;
378-
#if 0
379-
do_update(); // update d_fp is reqd
380-
#endif
381378
if (d_fp == NULL)
382379
throw std::runtime_error("work with file not open");
383380

@@ -394,7 +391,6 @@ int file_source::work(int noutput_items,
394391
d_buffering = true;
395392
if(d_buffering)
396393
{
397-
//d_reader_ready.wait(guard);
398394
//output zeroes while we are buffering
399395
guard.unlock();
400396
memset(o, 0, d_itemsize * noutput_items);
@@ -449,21 +445,6 @@ int file_source::work(int noutput_items,
449445
}
450446
else
451447
d_buffering = true;
452-
#if 0
453-
// Add stream tag whenever the file starts again
454-
455-
uint64_t nitems_to_read = std::min(size, d_items_remaining);
456-
457-
// Since the bounds of the file are known, unexpected nitems is an error
458-
if (nitems_to_read != fread(o, d_itemsize, nitems_to_read, (FILE*)d_fp))
459-
throw std::runtime_error("fread error");
460-
461-
size -= nitems_to_read;
462-
d_items_remaining -= nitems_to_read;
463-
o += nitems_to_read * d_itemsize;
464-
465-
// Ran out of items ("EOF")
466-
#endif
467448
}
468449
return (noutput_items - size);
469450
}

0 commit comments

Comments
 (0)