2005-02-08 Thierry GERAUD <theo(a)tegucigalpa.lrde.epita.fr>
* oln/core/value_box.hh: Ensure g++-2.95 compliance.
* oln/core/abstract/piter.hh: Likewise.
* oln/core/abstract/point.hh: Likewise.
* oln/core/abstract/size.hh: Likewise.
* oln/core/2d/dpoint2d.hh: Likewise.
* oln/core/2d/array2d.hh: Likewise.
* oln/core/2d/fwd_piter2d.hh: Likewise.
* oln/core/2d/point2d.hh: Likewise.
* oln/core/2d/size2d.hh: Likewise.
Index: oln/core/value_box.hh
===================================================================
--- oln/core/value_box.hh (revision 31)
+++ oln/core/value_box.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef OLENA_CORE_VALUE_BOX_HH
# define OLENA_CORE_VALUE_BOX_HH
-# include <ostream>
+# include <iostream>
# include <oln/core/macros.hh>
Index: oln/core/abstract/piter.hh
===================================================================
--- oln/core/abstract/piter.hh (revision 31)
+++ oln/core/abstract/piter.hh (working copy)
@@ -97,7 +97,7 @@
void invalidate()
{
this->exact().impl_invalidate();
- postcondition(not this->is_valid());
+ postcondition(! this->is_valid());
}
protected:
Index: oln/core/abstract/point.hh
===================================================================
--- oln/core/abstract/point.hh (revision 31)
+++ oln/core/abstract/point.hh (working copy)
@@ -92,7 +92,7 @@
*/
bool operator!=(const point& rhs) const
{
- return not this->operator==(rhs);
+ return ! this->operator==(rhs);
}
typedef oln_dpoint_type(E) dpoint_type;
Index: oln/core/abstract/size.hh
===================================================================
--- oln/core/abstract/size.hh (revision 31)
+++ oln/core/abstract/size.hh (working copy)
@@ -52,7 +52,7 @@
template <typename Ep>
bool operator!=(const size<Ep>& rhs) const
{
- return not this->operator==(rhs);
+ return ! this->operator==(rhs);
}
protected:
Index: oln/core/2d/dpoint2d.hh
===================================================================
--- oln/core/2d/dpoint2d.hh (revision 31)
+++ oln/core/2d/dpoint2d.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef OLENA_CORE_2D_DPOINT2D_HH
# define OLENA_CORE_2D_DPOINT2D_HH
-# include <ostream>
+# include <iostream>
# include <oln/core/coord.hh>
# include <oln/core/2d/point2d.hh>
@@ -69,12 +69,12 @@
bool operator==(const dpoint2d& rhs) const
{
- return this->row_ == rhs.row_ and this->col_ == rhs.col_;
+ return this->row_ == rhs.row_ && this->col_ == rhs.col_;
}
bool operator!=(const dpoint2d& rhs) const
{
- return not this->operator==(rhs);
+ return ! this->operator==(rhs);
}
const dpoint2d operator+(const dpoint2d& rhs) const
Index: oln/core/2d/array2d.hh
===================================================================
--- oln/core/2d/array2d.hh (revision 31)
+++ oln/core/2d/array2d.hh (working copy)
@@ -115,8 +115,8 @@
void impl_resize(const size2d& s)
{
- precondition(s.nrows() > 0 and
- s.ncols() > 0 and
+ precondition(s.nrows() > 0 &&
+ s.ncols() > 0 &&
s.border() >= 0);
invariant_();
this->clear_data();
@@ -147,18 +147,18 @@
bool impl_hold(const point2d& p) const
{
return
- p.row() >= 0 and
- p.row() < size_.nrows() and
- p.col() >= 0 and
+ p.row() >= 0 &&
+ p.row() < size_.nrows() &&
+ p.col() >= 0 &&
p.col() < size_.ncols();
}
bool impl_hold_large(const point2d& p) const
{
return
- p.row() >= - size_.border() and
- p.row() < size_.nrows() + size_.border() and
- p.col() >= - size_.border() and
+ p.row() >= - size_.border() &&
+ p.row() < size_.nrows() + size_.border() &&
+ p.col() >= - size_.border() &&
p.col() < size_.ncols() + size_.border();
}
@@ -193,16 +193,16 @@
void invariant_() const
{
- invariant((buffer_ != 0 and
- array_ != 0 and
- size_.nrows() > 0 and
- size_.ncols() > 0 and
+ invariant((buffer_ != 0 &&
+ array_ != 0 &&
+ size_.nrows() > 0 &&
+ size_.ncols() > 0 &&
size_.border() >= 0)
- or
- (buffer_ == 0 and
- array_ == 0 and
- size_.nrows().is_undefined() and
- size_.ncols().is_undefined() and
+ ||
+ (buffer_ == 0 &&
+ array_ == 0 &&
+ size_.nrows().is_undefined() &&
+ size_.ncols().is_undefined() &&
size_.border().is_undefined()));
}
Index: oln/core/2d/fwd_piter2d.hh
===================================================================
--- oln/core/2d/fwd_piter2d.hh (revision 31)
+++ oln/core/2d/fwd_piter2d.hh (working copy)
@@ -70,35 +70,35 @@
{
this->p_.row() = 0;
this->p_.col() = 0;
- postcondition(this->p_.row().is_defined() and this->p_.col().is_defined());
+ postcondition(this->p_.row().is_defined() &&
this->p_.col().is_defined());
}
bool impl_is_valid() const
{
- precondition(this->p_.row().is_defined() and this->p_.col().is_defined());
+ precondition(this->p_.row().is_defined() &&
this->p_.col().is_defined());
return this->p_.row() < this->s_.nrows();
}
void impl_next()
{
- precondition(this->p_.row().is_defined() and this->p_.col().is_defined());
- precondition(this->p_.row() >= 0 and this->p_.row() <=
this->s_.nrows()
- and
- this->p_.col() >= 0 and this->p_.col() <= this->s_.ncols());
+ precondition(this->p_.row().is_defined() &&
this->p_.col().is_defined());
+ precondition(this->p_.row() >= 0 && this->p_.row() <=
this->s_.nrows()
+ &&
+ this->p_.col() >= 0 && this->p_.col() <= this->s_.ncols());
++this->p_.col();
if (this->p_.col() != this->s_.ncols())
return;
this->p_.col() = 0;
precondition(this->p_.row() != this->s_.nrows());
++this->p_.row();
- postcondition(this->p_.row().is_defined() and this->p_.col().is_defined());
+ postcondition(this->p_.row().is_defined() &&
this->p_.col().is_defined());
}
void impl_invalidate()
{
this->p_.row() = this->s_.nrows();
this->p_.col() = this->s_.ncols();
- postcondition(this->p_.row().is_defined() and this->p_.col().is_defined());
+ postcondition(this->p_.row().is_defined() &&
this->p_.col().is_defined());
}
};
Index: oln/core/2d/point2d.hh
===================================================================
--- oln/core/2d/point2d.hh (revision 31)
+++ oln/core/2d/point2d.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef OLENA_CORE_2D_POINT2D_HH
# define OLENA_CORE_2D_POINT2D_HH
-# include <ostream>
+# include <iostream>
# include <oln/core/abstract/point.hh>
# include <oln/core/coord.hh>
@@ -95,7 +95,7 @@
bool impl_eq(const point2d& rhs) const
{
- return this->row_ == rhs.row_ and this->col_ == rhs.col_;
+ return this->row_ == rhs.row_ && this->col_ == rhs.col_;
}
protected:
Index: oln/core/2d/size2d.hh
===================================================================
--- oln/core/2d/size2d.hh (revision 31)
+++ oln/core/2d/size2d.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef OLENA_CORE_2D_SIZE2D_HH
# define OLENA_CORE_2D_SIZE2D_HH
-# include <ostream>
+# include <iostream>
# include <oln/core/abstract/size.hh>
# include <oln/core/coord.hh>
@@ -73,7 +73,7 @@
bool impl_eq(const size2d& rhs) const
{
- return this->nrows_ == rhs.nrows_ and
+ return this->nrows_ == rhs.nrows_ &&
this->ncols_ == rhs.ncols_;
}
Show replies by date