fixes for the int vs unsigned long warnings

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1157 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-10-25 17:03:57 +00:00
parent 9e13a93730
commit f826e64de1
3 changed files with 21 additions and 22 deletions

View File

@ -1,3 +1,17 @@
2000-10-25 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/frontends/ButtonPolicies.h: remove the LOstream and remove
the two recently added operator<< for SMInput and State.
* src/frontends/ButtonPolicies.C (PreferencesPolicy): cast
SMI_TOTAL to int.
(OkCancelPolicy): ditto
(OkCancelReadOnlyPolicy): ditto
(NoRepeatedApplyReadOnlyPolicy): ditto
(OkApplyCancelReadOnlyPolicy): ditto
(OkApplyCancelPolicy): ditto
(NoRepeatedApplyPolicy): ditto
2000-10-25 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/frontends/ButtonPolicies.h: include "support/LOstream.h" and

View File

@ -50,7 +50,7 @@ PreferencesPolicy::PreferencesPolicy()
: state_(INITIAL),
outputs_(APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(APPLIED + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -123,7 +123,7 @@ OkCancelPolicy::OkCancelPolicy()
: state_(INITIAL),
outputs_(INVALID + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(INVALID + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -176,7 +176,7 @@ OkCancelReadOnlyPolicy::OkCancelReadOnlyPolicy()
: state_(INITIAL),
outputs_(RO_INVALID + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(RO_INVALID + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -251,7 +251,7 @@ NoRepeatedApplyReadOnlyPolicy::NoRepeatedApplyReadOnlyPolicy()
: state_(INITIAL),
outputs_(RO_INVALID + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(RO_INVALID + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -327,7 +327,7 @@ OkApplyCancelReadOnlyPolicy::OkApplyCancelReadOnlyPolicy()
: state_(INITIAL),
outputs_(RO_APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(RO_APPLIED + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -417,7 +417,7 @@ OkApplyCancelPolicy::OkApplyCancelPolicy()
: state_(INITIAL),
outputs_(APPLIED + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(APPLIED + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;
@ -481,7 +481,7 @@ NoRepeatedApplyPolicy::NoRepeatedApplyPolicy()
: state_(INITIAL),
outputs_(INVALID + 1, ButtonPolicy::ALL_BUTTONS),
state_machine_(INVALID + 1,
StateArray(SMI_TOTAL, ButtonPolicy::BOGUS))
StateArray(int(SMI_TOTAL), ButtonPolicy::BOGUS))
{
// Build the state output map
outputs_[INITIAL] = CLOSE;

View File

@ -22,7 +22,6 @@
#include <vector>
#include <boost/utility.hpp>
#include "support/LOstream.h"
/** An abstract base class for button policies.
A state machine implementation of the various button policies used by the
@ -159,20 +158,6 @@ public:
};
inline
std::ostream & operator<<(std::ostream & os, ButtonPolicy::SMInput smi)
{
os << int(smi);
return os;
}
inline
std::ostream & operator<<(std::ostream & os, ButtonPolicy::State st)
{
os << int(st);
return os;
}
//--------------------- Actual Policy Classes -----------------------------
/** Ok and Cancel buttons for dialogs with read-only operation.