diff --git a/include/cmemlink.h b/include/cmemlink.h index d6dbb58..066b860 100644 --- a/include/cmemlink.h +++ b/include/cmemlink.h @@ -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); } diff --git a/include/memblock.h b/include/memblock.h index d9a64e8..39b8337 100644 --- a/include/memblock.h +++ b/include/memblock.h @@ -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. }; diff --git a/include/mistream.h b/include/mistream.h index fb8a9cf..a190b1a 100644 --- a/include/mistream.h +++ b/include/mistream.h @@ -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()); } diff --git a/include/mostream.h b/include/mostream.h index 935b1de..51b6c37 100644 --- a/include/mostream.h +++ b/include/mostream.h @@ -77,8 +77,8 @@ public: inline void swap (ostream& os); template 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); } diff --git a/include/ofstream.h b/include/ofstream.h index 8046db9..77fc83d 100644 --- a/include/ofstream.h +++ b/include/ofstream.h @@ -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; diff --git a/include/sostream.h b/include/sostream.h index ec99338..e1e035b 100644 --- a/include/sostream.h +++ b/include/sostream.h @@ -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()); } diff --git a/include/typeinfo.h b/include/typeinfo.h index 6ba868e..a1bcce2 100644 --- a/include/typeinfo.h +++ b/include/typeinfo.h @@ -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&) { } diff --git a/include/ustring.h b/include/ustring.h index d8b35a0..4332574 100644 --- a/include/ustring.h +++ b/include/ustring.h @@ -3,10 +3,6 @@ // Copyright (c) 2005 by Mike Sharov // 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