https://svn.lrde.epita.fr/svn/oln/trunk/static
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Enforce coding style in stc::exact.
* stc/any.hh, tests/exact.cc: s/exact_t/exact_type/g.
* stc/exact.hh: Likewise.
s/case_t/case_type/.
Remove superfluous `inline' qualifiers.
stc/any.hh | 6 +++---
stc/exact.hh | 17 ++++++++---------
tests/exact.cc | 6 +++---
3 files changed, 14 insertions(+), 15 deletions(-)
Index: tests/exact.cc
--- tests/exact.cc (revision 487)
+++ tests/exact.cc (working copy)
@@ -118,7 +118,7 @@
//-----------------------------------------
{
concrete t;
- const concrete::exact_t& tmp = stc::exact(t);
+ const concrete::exact_type& tmp = stc::exact(t);
std::cout << &t << " = "
<< &tmp << std::endl;
}
@@ -132,7 +132,7 @@
{
concrete t;
sub_abstraction<concrete>& st = t;
- const sub_abstraction<concrete>::exact_t& tmp = stc::exact(st);
+ const sub_abstraction<concrete>::exact_type& tmp = stc::exact(st);
std::cout << &t << " = "
<< &tmp << std::endl;
tmp.foo();
@@ -147,7 +147,7 @@
{
concrete t;
abstraction<concrete>& a = t;
- const abstraction<concrete>::exact_t& tmp = stc::exact(a);
+ const abstraction<concrete>::exact_type& tmp = stc::exact(a);
std::cout << &t << " = "
<< &tmp << std::endl;
}
Index: stc/exact.hh
--- stc/exact.hh (revision 487)
+++ stc/exact.hh (working copy)
@@ -94,9 +94,9 @@
{
struct protected_
{
- typedef typename T::exact_t ret;
+ typedef typename T::exact_type ret;
- static inline ret& impl(T& t)
+ static ret& impl(T& t)
{
return t.exact();
}
@@ -110,12 +110,11 @@
{
typedef T ret;
- static inline ret& impl(T& t)
+ static ret& impl(T& t)
{
return t;
}
};
-
};
@@ -124,10 +123,10 @@
{
typedef typename switch_<tag::exact, T>::ret ret;
- static inline ret& impl(const T& t)
+ static ret& impl(const T& t)
{
- typedef typename case_<tag::exact, T>::ret case_t;
- return case_t::impl(const_cast<T&>(t));
+ typedef typename case_<tag::exact, T>::ret case_type;
+ return case_type::impl(const_cast<T&>(t));
}
};
@@ -137,7 +136,7 @@
{
typedef const typename to_exact_<T>::ret ret;
- static inline ret& impl(const T& t)
+ static ret& impl(const T& t)
{
return to_exact_<T>::impl(const_cast<T&>(t));
}
@@ -149,7 +148,7 @@
{
typedef typename to_exact_<T>::ret * ret;
- static inline ret impl(T* t)
+ static ret impl(T* t)
{
return & to_exact_<T>::impl(*t);
}
Index: stc/any.hh
--- stc/any.hh (revision 487)
+++ stc/any.hh (working copy)
@@ -67,7 +67,7 @@
struct any <E,
dispatch_policy::best_speed>
{
- typedef E exact_t;
+ typedef E exact_type;
E& exact() {
precondition(exact_ptr != 0);
@@ -131,7 +131,7 @@
struct any <E,
dispatch_policy::best_memory>
{
- typedef E exact_t;
+ typedef E exact_type;
E& exact() {
# if defined __GNUC__ && __GNUC__ >= 3
@@ -189,7 +189,7 @@
struct any <E,
dispatch_policy::simple>
{
- typedef E exact_t;
+ typedef E exact_type;
E& exact() {
return *(E*)(void*)this;