view libinterp/corefcn/oct-strstrm.cc @ 20893:384ff5aa9437

2015 Code Sprint: Eliminate useless return statements after error (). * data.cc, graphics.cc, graphics.in.h, ls-mat4.cc, ls-mat5.cc, oct-fstrm.cc, oct-stream.cc, oct-strstrm.cc, __delaunayn__.cc, ov-base-int.cc, ov-classdef.h, ov-complex.cc, ov-cx-sparse.cc, ov-fcn-inline.cc, ov-float.cc, ov-flt-complex.cc, ov-java.cc, ov-range.cc, ov-re-sparse.cc, ov-scalar.cc, ov-struct.cc, ov-usr-fcn.cc, ov.cc, op-cm-cm.cc, op-cm-m.cc, op-cm-scm.cc, op-cm-sm.cc, op-fcm-fcm.cc, op-fcm-fm.cc, op-fm-fcm.cc, op-fm-fm.cc, op-m-cm.cc, op-m-m.cc, op-m-scm.cc, op-m-sm.cc, op-scm-cm.cc, op-scm-m.cc, op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-m.cc, op-sm-scm.cc, op-sm-sm.cc, pt-exp.cc: Eliminate useless return statements after error ().
author Rik <rik@octave.org>
date Mon, 14 Dec 2015 12:59:29 -0800
parents 4197fc428c7d
children 8ddb11c0b1f8
line wrap: on
line source

/*

Copyright (C) 1996-2015 John W. Eaton

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "oct-strstrm.h"

// Position a stream at OFFSET relative to ORIGIN.

int
octave_base_strstream::seek (off_t, int)
{
  error ("fseek: invalid operation");
}

// Return current stream position.

off_t
octave_base_strstream::tell (void)
{
  error ("ftell: invalid operation");
}

octave_stream
octave_istrstream::create (const char *data, std::ios::openmode arg_md,
                           oct_mach_info::float_format flt_fmt)
{
  return octave_stream (new octave_istrstream (data, arg_md, flt_fmt));
}

octave_stream
octave_istrstream::create (const std::string& data, std::ios::openmode arg_md,
                           oct_mach_info::float_format flt_fmt)
{
  return octave_stream (new octave_istrstream (data, arg_md, flt_fmt));
}

octave_stream
octave_ostrstream::create (std::ios::openmode arg_md,
                           oct_mach_info::float_format flt_fmt)
{
  return octave_stream (new octave_ostrstream (arg_md, flt_fmt));
}