]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/buffered.cpp
Move non-oneliner functions out of RefPtr class declaration
[libs/core.git] / source / io / buffered.cpp
index be4c8d47c8bc263d516846c4053018b9696f2824..2836e4bbbaeb879de07be26bf5fba2ecea8fcad9 100644 (file)
@@ -32,6 +32,16 @@ Buffered::~Buffered()
        delete[] buf;
 }
 
+void Buffered::set_block(bool)
+{
+       throw logic_error("Buffered::set_block");
+}
+
+void Buffered::set_inherit(bool)
+{
+       throw logic_error("Buffered::set_block");
+}
+
 void Buffered::flush()
 {
        if(cur_op==M_WRITE)
@@ -48,7 +58,7 @@ void Buffered::flush()
                }
        }
        else if(cur_op==M_READ)
-               begin=end = buf;
+               begin = end = buf;
 }
 
 unsigned Buffered::do_write(const char *data, unsigned size)
@@ -101,7 +111,7 @@ unsigned Buffered::do_read(char *data, unsigned size)
                // Give out whatever is in the buffer already
                memcpy(data, begin, end-begin);
                unsigned ret = end-begin;
-               begin=end = buf;
+               begin = end = buf;
 
                data += ret;
                size -= ret;
@@ -168,6 +178,11 @@ int Buffered::get()
        return static_cast<unsigned char>(c);
 }
 
+const Handle &Buffered::get_handle(Mode)
+{
+       throw logic_error("Buffered::get_handle");
+}
+
 void Buffered::set_op(Mode op)
 {
        if(op!=cur_op)