remove virtual
This commit is contained in:
parent
81bd7091b8
commit
2056f47ad0
|
@ -51,12 +51,12 @@ public:
|
|||
inline cmemlink (void) : m_Data (NULL), m_Size (0) { }
|
||||
inline cmemlink (const void* p, size_type n) : m_Data (const_pointer(p)), m_Size (n) { assert (p || !n); }
|
||||
inline cmemlink (const cmemlink& l) : m_Data (l.m_Data), m_Size (l.m_Size) {}
|
||||
inline virtual ~cmemlink (void) noexcept {}
|
||||
inline ~cmemlink (void) noexcept {}
|
||||
void link (const void* p, size_type n);
|
||||
inline void link (const cmemlink& l) { link (l.begin(), l.size()); }
|
||||
inline void link (const void* first, const void* last) { link (first, distance (first, last)); }
|
||||
inline void relink (const void* p, size_type n);
|
||||
virtual void unlink (void) noexcept { m_Data = NULL; m_Size = 0; }
|
||||
void unlink (void) noexcept { m_Data = NULL; m_Size = 0; }
|
||||
inline rcself_t operator= (const cmemlink& l) { link (l); return (*this); }
|
||||
bool operator== (const cmemlink& l) const noexcept;
|
||||
inline void swap (cmemlink& l) { ::ustl::swap (m_Data, l.m_Data); ::ustl::swap (m_Size, l.m_Size); }
|
||||
|
|
|
@ -26,8 +26,8 @@ public:
|
|||
explicit memblock (const cmemlink& b);
|
||||
explicit memblock (const memlink& b);
|
||||
memblock (const memblock& b);
|
||||
virtual ~memblock (void) noexcept;
|
||||
virtual void unlink (void) noexcept;
|
||||
~memblock (void) noexcept;
|
||||
void unlink (void) noexcept;
|
||||
inline void assign (const cmemlink& l) { assign (l.cdata(), l.readable_size()); }
|
||||
inline const memblock& operator= (const cmemlink& l) { assign (l); return (*this); }
|
||||
inline const memblock& operator= (const memlink& l) { assign (l); return (*this); }
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
inline void swap (memblock&& l) { memlink::swap (l); ::ustl::swap (m_Capacity, l.m_Capacity); }
|
||||
#endif
|
||||
protected:
|
||||
virtual size_type minimumFreeCapacity (void) const noexcept __attribute__((const));
|
||||
size_type minimumFreeCapacity (void) const noexcept __attribute__((const));
|
||||
private:
|
||||
size_type m_Capacity; ///< Number of bytes allocated by Resize.
|
||||
};
|
||||
|
|
|
@ -71,8 +71,8 @@ public:
|
|||
inline void link (const void* f, const void* l) { cmemlink::link (f, l); }
|
||||
inline void relink (const void* p, streamsize n) { cmemlink::relink (p, n); m_Pos = 0; }
|
||||
inline void relink (const cmemlink& l) { relink (l.cdata(), l.readable_size()); }
|
||||
virtual void unlink (void) noexcept;
|
||||
inline virtual streamsize underflow (streamsize = 1) { return (remaining()); }
|
||||
void unlink (void) noexcept;
|
||||
inline streamsize underflow (streamsize = 1) { return (remaining()); }
|
||||
inline uoff_t pos (void) const { return (m_Pos); }
|
||||
inline const_iterator ipos (void) const { return (begin() + pos()); }
|
||||
inline streamsize remaining (void) const { return (size() - pos()); }
|
||||
|
|
|
@ -77,8 +77,8 @@ public:
|
|||
inline void swap (ostream& os);
|
||||
template <typename T>
|
||||
inline void iwrite (const T& v);
|
||||
inline virtual streamsize overflow (streamsize = 1){ return (remaining()); }
|
||||
virtual void unlink (void) noexcept;
|
||||
inline streamsize overflow (streamsize = 1){ return (remaining()); }
|
||||
void unlink (void) noexcept;
|
||||
inline void link (void* p, streamsize n) { memlink::link (p, n); }
|
||||
inline void link (memlink& l) { memlink::link (l.data(), l.writable_size()); }
|
||||
inline void link (void* f, void* l) { memlink::link (f, l); }
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
ofstream (void);
|
||||
explicit ofstream (int Fd);
|
||||
explicit ofstream (const char* filename, openmode mode = out);
|
||||
virtual ~ofstream (void) noexcept;
|
||||
~ofstream (void) noexcept;
|
||||
inline void open (const char* filename, openmode mode = out) { m_File.open (filename, mode); clear (m_File.rdstate()); }
|
||||
void close (void);
|
||||
inline bool is_open (void) const { return (m_File.is_open()); }
|
||||
|
@ -29,7 +29,7 @@ public:
|
|||
inline int fd (void) const { return (m_File.fd()); }
|
||||
ofstream& seekp (off_t p, seekdir d = beg);
|
||||
ofstream& flush (void);
|
||||
virtual size_type overflow (size_type n = 1);
|
||||
size_type overflow (size_type n = 1);
|
||||
private:
|
||||
fstream m_File;
|
||||
};
|
||||
|
@ -52,7 +52,7 @@ public:
|
|||
inline int fd (void) const { return (m_File.fd()); }
|
||||
ifstream& seekg (off_t p, seekdir d = beg);
|
||||
int sync (void);
|
||||
virtual size_type underflow (size_type n = 1);
|
||||
size_type underflow (size_type n = 1);
|
||||
private:
|
||||
string m_Buffer;
|
||||
fstream m_File;
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
inline ostringstream& write (const cmemlink& buf) { return (write (buf.begin(), buf.size())); }
|
||||
inline ostringstream& seekp (off_t p, seekdir d =beg) { ostream::seekp(p,d); return (*this); }
|
||||
ostringstream& flush (void) { m_Buffer.resize (pos()); return (*this); }
|
||||
virtual size_type overflow (size_type n = 1);
|
||||
size_type overflow (size_type n = 1);
|
||||
protected:
|
||||
inline void reserve (size_type n) { m_Buffer.reserve (n, false); }
|
||||
inline size_type capacity (void) const { return (m_Buffer.capacity()); }
|
||||
|
|
|
@ -13,15 +13,15 @@ namespace __cxxabiv1 { class __class_type_info; }
|
|||
namespace std {
|
||||
class type_info {
|
||||
public:
|
||||
inline virtual ~type_info (void) { }
|
||||
inline ~type_info (void) { }
|
||||
inline const char* name (void) const { return (__name[0] == '*' ? __name + 1 : __name); }
|
||||
inline bool before (const type_info& v) const { return (__name < v.__name); }
|
||||
inline bool operator==(const type_info& v) const { return (__name == v.__name); }
|
||||
inline bool operator!=(const type_info& v) const { return (!operator==(v)); }
|
||||
virtual bool __is_pointer_p (void) const;
|
||||
virtual bool __is_function_p (void) const;
|
||||
virtual bool __do_catch (const type_info* __thr_type, void** __thr_obj, unsigned __outer) const;
|
||||
virtual bool __do_upcast (const __cxxabiv1::__class_type_info* __target, void** __obj_ptr) const;
|
||||
bool __is_pointer_p (void) const;
|
||||
bool __is_function_p (void) const;
|
||||
bool __do_catch (const type_info* __thr_type, void** __thr_obj, unsigned __outer) const;
|
||||
bool __do_upcast (const __cxxabiv1::__class_type_info* __target, void** __obj_ptr) const;
|
||||
explicit inline type_info (const char* newname) : __name(newname) { }
|
||||
private:
|
||||
inline void operator= (const type_info&) { }
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
// Copyright (c) 2005 by Mike Sharov <msharov@users.sourceforge.net>
|
||||
// This file is free software, distributed under the MIT License.
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
#include "memblock.h"
|
||||
#include "utf8.h"
|
||||
|
@ -221,7 +217,7 @@ public:
|
|||
inline string& replace (const_iterator first, const_iterator last, initlist_t v) { return (replace (first, last, v.begin(), v.end())); }
|
||||
#endif
|
||||
protected:
|
||||
virtual size_type minimumFreeCapacity (void) const noexcept __attribute__((const));
|
||||
size_type minimumFreeCapacity (void) const noexcept __attribute__((const));
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -310,7 +306,3 @@ inline hashvalue_t hash_value (const char* v)
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
} // namespace ustl
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue