Commit dd42abcc by Paolo Carlini Committed by Paolo Carlini

locale_classes.h: Remove redundant inline specifiers.

2007-04-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/locale_classes.h: Remove redundant inline specifiers.
	* include/bits/ios_base.h: Likewise.
	* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error line
	numbers.
	* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.

From-SVN: r124148
parent 29ea08da
2007-04-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_classes.h: Remove redundant inline specifiers.
* include/bits/ios_base.h: Likewise.
* testsuite/27_io/ios_base/cons/assign_neg.cc: Adjust dg-error line
numbers.
* testsuite/27_io/ios_base/cons/copy_neg.cc: Likewise.
2007-04-24 Paolo Carlini <pcarlini@suse.de> 2007-04-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.h (class collate, class collate_byname): * include/bits/locale_facets.h (class collate, class collate_byname):
......
...@@ -546,8 +546,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -546,8 +546,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @brief Access to format flags. * @brief Access to format flags.
* @return The format control flags for both input and output. * @return The format control flags for both input and output.
*/ */
inline fmtflags fmtflags
flags() const { return _M_flags; } flags() const
{ return _M_flags; }
/** /**
* @brief Setting new format flags all at once. * @brief Setting new format flags all at once.
...@@ -556,7 +557,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -556,7 +557,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* *
* This function overwrites all the format flags with @a fmtfl. * This function overwrites all the format flags with @a fmtfl.
*/ */
inline fmtflags fmtflags
flags(fmtflags __fmtfl) flags(fmtflags __fmtfl)
{ {
fmtflags __old = _M_flags; fmtflags __old = _M_flags;
...@@ -572,7 +573,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -572,7 +573,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This function sets additional flags in format control. Flags that * This function sets additional flags in format control. Flags that
* were previously set remain set. * were previously set remain set.
*/ */
inline fmtflags fmtflags
setf(fmtflags __fmtfl) setf(fmtflags __fmtfl)
{ {
fmtflags __old = _M_flags; fmtflags __old = _M_flags;
...@@ -589,7 +590,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -589,7 +590,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* This function clears @a mask in the format flags, then sets * This function clears @a mask in the format flags, then sets
* @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield. * @a fmtfl @c & @a mask. An example mask is @c ios_base::adjustfield.
*/ */
inline fmtflags fmtflags
setf(fmtflags __fmtfl, fmtflags __mask) setf(fmtflags __fmtfl, fmtflags __mask)
{ {
fmtflags __old = _M_flags; fmtflags __old = _M_flags;
...@@ -604,8 +605,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -604,8 +605,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* *
* This function clears @a mask in the format flags. * This function clears @a mask in the format flags.
*/ */
inline void void
unsetf(fmtflags __mask) { _M_flags &= ~__mask; } unsetf(fmtflags __mask)
{ _M_flags &= ~__mask; }
/** /**
* @brief Flags access. * @brief Flags access.
...@@ -616,15 +618,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -616,15 +618,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* DR 189. * DR 189.
* @endif * @endif
*/ */
inline streamsize streamsize
precision() const { return _M_precision; } precision() const
{ return _M_precision; }
/** /**
* @brief Changing flags. * @brief Changing flags.
* @param prec The new precision value. * @param prec The new precision value.
* @return The previous value of precision(). * @return The previous value of precision().
*/ */
inline streamsize streamsize
precision(streamsize __prec) precision(streamsize __prec)
{ {
streamsize __old = _M_precision; streamsize __old = _M_precision;
...@@ -638,15 +641,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -638,15 +641,16 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* *
* "Minimum field width" refers to the number of characters. * "Minimum field width" refers to the number of characters.
*/ */
inline streamsize streamsize
width() const { return _M_width; } width() const
{ return _M_width; }
/** /**
* @brief Changing flags. * @brief Changing flags.
* @param wide The new width value. * @param wide The new width value.
* @return The previous value of width(). * @return The previous value of width().
*/ */
inline streamsize streamsize
width(streamsize __wide) width(streamsize __wide)
{ {
streamsize __old = _M_width; streamsize __old = _M_width;
...@@ -688,8 +692,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -688,8 +692,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* returns @c loc. Otherwise, it returns a copy of @c std::locale(), * returns @c loc. Otherwise, it returns a copy of @c std::locale(),
* the global C++ locale. * the global C++ locale.
*/ */
inline locale locale
getloc() const { return _M_ios_locale; } getloc() const
{ return _M_ios_locale; }
/** /**
* @brief Locale access * @brief Locale access
...@@ -698,8 +703,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -698,8 +703,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* Like getloc above, but returns a reference instead of * Like getloc above, but returns a reference instead of
* generating a copy. * generating a copy.
*/ */
inline const locale& const locale&
_M_getloc() const { return _M_ios_locale; } _M_getloc() const
{ return _M_ios_locale; }
// [27.4.2.5] ios_base storage functions // [27.4.2.5] ios_base storage functions
/** /**
...@@ -732,7 +738,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -732,7 +738,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* obtain an index that is safe to use. Also note that since the array * obtain an index that is safe to use. Also note that since the array
* can grow dynamically, it is not safe to hold onto the reference. * can grow dynamically, it is not safe to hold onto the reference.
*/ */
inline long& long&
iword(int __ix) iword(int __ix)
{ {
_Words& __word = (__ix < _M_word_size) _Words& __word = (__ix < _M_word_size)
...@@ -753,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -753,7 +759,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* obtain an index that is safe to use. Also note that since the array * obtain an index that is safe to use. Also note that since the array
* can grow dynamically, it is not safe to hold onto the reference. * can grow dynamically, it is not safe to hold onto the reference.
*/ */
inline void*& void*&
pword(int __ix) pword(int __ix)
{ {
_Words& __word = (__ix < _M_word_size) _Words& __word = (__ix < _M_word_size)
......
...@@ -237,9 +237,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -237,9 +237,9 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
* @param other The locale to compare against. * @param other The locale to compare against.
* @return ! (*this == other) * @return ! (*this == other)
*/ */
inline bool bool
operator!=(const locale& __other) const throw () operator!=(const locale& __other) const throw ()
{ return !(this->operator==(__other)); } { return !(this->operator==(__other)); }
/** /**
* @brief Compare two strings according to collate. * @brief Compare two strings according to collate.
...@@ -398,11 +398,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -398,11 +398,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_S_get_c_name(); _S_get_c_name();
private: private:
inline void void
_M_add_reference() const throw() _M_add_reference() const throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
inline void void
_M_remove_reference() const throw() _M_remove_reference() const throw()
{ {
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
...@@ -503,11 +503,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -503,11 +503,11 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
static const locale::id* const _S_id_messages[]; static const locale::id* const _S_id_messages[];
static const locale::id* const* const _S_facet_categories[]; static const locale::id* const* const _S_facet_categories[];
inline void void
_M_add_reference() throw() _M_add_reference() throw()
{ __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); } { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
inline void void
_M_remove_reference() throw() _M_remove_reference() throw()
{ {
if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1) if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) == 1)
...@@ -530,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -530,7 +530,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
void void
operator=(const _Impl&); // Not defined. operator=(const _Impl&); // Not defined.
inline bool bool
_M_check_same_name() _M_check_same_name()
{ {
bool __ret = true; bool __ret = true;
...@@ -554,7 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) ...@@ -554,7 +554,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
_M_install_facet(const locale::id*, const facet*); _M_install_facet(const locale::id*, const facet*);
template<typename _Facet> template<typename _Facet>
inline void void
_M_init_facet(_Facet* __facet) _M_init_facet(_Facet* __facet)
{ _M_install_facet(&_Facet::id, __facet); } { _M_install_facet(&_Facet::id, __facet); }
......
...@@ -42,5 +42,5 @@ void test01() ...@@ -42,5 +42,5 @@ void test01()
} }
// { dg-error "synthesized" "" { target *-*-* } 41 } // { dg-error "synthesized" "" { target *-*-* } 41 }
// { dg-error "within this context" "" { target *-*-* } 34 } // { dg-error "within this context" "" { target *-*-* } 34 }
// { dg-error "is private" "" { target *-*-* } 784 } // { dg-error "is private" "" { target *-*-* } 790 }
// { dg-error "operator=" "" { target *-*-* } 0 } // { dg-error "operator=" "" { target *-*-* } 0 }
...@@ -42,5 +42,5 @@ void test02() ...@@ -42,5 +42,5 @@ void test02()
} }
// { dg-error "within this context" "" { target *-*-* } 35 } // { dg-error "within this context" "" { target *-*-* } 35 }
// { dg-error "synthesized" "" { target *-*-* } 41 } // { dg-error "synthesized" "" { target *-*-* } 41 }
// { dg-error "is private" "" { target *-*-* } 781 } // { dg-error "is private" "" { target *-*-* } 787 }
// { dg-error "copy constructor" "" { target *-*-* } 0 } // { dg-error "copy constructor" "" { target *-*-* } 0 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment