[DEBUG] gcc compilation warning

This commit is contained in:
Edouard DUPIN 2014-08-21 21:00:13 +02:00
parent 3175657fed
commit 153774177e
5 changed files with 43 additions and 45 deletions

2
external/etk vendored

@ -1 +1 @@
Subproject commit 2c6a1b8fc877f4f496bd6f6fdaae333d7d808a94
Subproject commit 3ad4738a3a0697252a5ecc8ce8fdee5c75f2404b

View File

@ -299,19 +299,18 @@ std::ostream& ewol::operator <<(std::ostream& _os, const ewol::Dimension& _obj)
return _os;
}
template<> std::string etk::to_string<ewol::Dimension>(const ewol::Dimension& _obj) {
return _obj;
}
template<> std::u32string etk::to_u32string<ewol::Dimension>(const ewol::Dimension& _obj) {
return etk::to_u32string(etk::to_string(_obj));
}
template<> bool etk::from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::string& _value) {
_variableRet = ewol::Dimension(_value);
return true;
}
template<> bool etk::from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::u32string& _value) {
return from_string(_variableRet, etk::to_string(_value));
}
namespace etk {
template<> std::string to_string<ewol::Dimension>(const ewol::Dimension& _obj) {
return _obj;
}
template<> std::u32string to_u32string<ewol::Dimension>(const ewol::Dimension& _obj) {
return etk::to_u32string(etk::to_string(_obj));
}
template<> bool from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::string& _value) {
_variableRet = ewol::Dimension(_value);
return true;
}
template<> bool from_string<ewol::Dimension>(ewol::Dimension& _variableRet, const std::u32string& _value) {
return from_string(_variableRet, etk::to_string(_value));
}
};

View File

@ -623,20 +623,19 @@ const etk::Color<float>& ewol::compositing::Shaper::getColor(int32_t _id) {
return m_colorProperty->get(_id);
}
namespace etk {
template<> std::string to_string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
return _obj.getSource();
}
template<> std::u32string to_u32string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
return etk::to_u32string(etk::to_string(_obj));
}
template<> bool from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::string& _value) {
_variableRet.setSource(_value);
return true;
}
template<> bool from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::u32string& _value) {
return from_string(_variableRet, etk::to_string(_value));
}
};
template<> std::string etk::to_string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
return _obj.getSource();
}
template<> std::u32string etk::to_u32string<ewol::compositing::Shaper>(const ewol::compositing::Shaper& _obj) {
return etk::to_u32string(etk::to_string(_obj));
}
template<> bool etk::from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::string& _value) {
_variableRet.setSource(_value);
return true;
}
template<> bool etk::from_string<ewol::compositing::Shaper>(ewol::compositing::Shaper& _variableRet, const std::u32string& _value) {
return from_string(_variableRet, etk::to_string(_value));
}

View File

@ -133,21 +133,21 @@ bool ewol::widget::Button::onEventInput(const ewol::event::Input& _event) {
markToRedraw();
}
if(ewol::key::statusSingle == _event.getStatus()) {
if( ( m_value == true
if( ( m_value.get() == true
&& ewol::widget::Button::lockWhenPressed == m_lock)
|| ( m_value == false
|| ( m_value.get() == false
&& ewol::widget::Button::lockWhenReleased == m_lock) ) {
// nothing to do : Lock mode ...
// user might set himself the new correct value with @ref setValue(xxx)
} else {
// inverse value :
setValue((m_value)?false:true);
setValue((m_value.get())?false:true);
EWOL_VERBOSE(getName() << " : Generate event : " << signalPressed);
signalPressed.emit(shared_from_this());
EWOL_VERBOSE(getName() << " : Generate event : " << signalValue << " val=" << m_value );
signalValue.emit(shared_from_this(), m_value.get());
if( false == m_toggleMode
&& true == m_value) {
if( m_toggleMode.get() == false
&& m_value.get() == true) {
setValue(false);
EWOL_VERBOSE(getName() << " : Generate event : " << signalValue << " val=" << m_value);
signalValue.emit(shared_from_this(), m_value.get());
@ -216,7 +216,7 @@ void ewol::widget::Button::onParameterChangeValue(const ewol::object::ParameterR
markToRedraw();
} else if (_paramPointer == m_value) {
if (m_toggleMode == true) {
if (m_value == false) {
if (m_value.get() == false) {
m_idWidgetDisplayed = 0;
} else {
m_idWidgetDisplayed = 1;
@ -243,20 +243,20 @@ void ewol::widget::Button::onParameterChangeValue(const ewol::object::ParameterR
CheckStatus();
markToRedraw();
} else if (_paramPointer == m_toggleMode) {
if (m_value == true) {
m_value = false;
if (m_value.get() == true) {
m_value.get() = false;
// TODO : change display and send event ...
}
if (m_toggleMode == false) {
if (m_toggleMode.get() == false) {
m_idWidgetDisplayed = 0;
} else {
if (m_value == false) {
if (m_value.get() == false) {
m_idWidgetDisplayed = 0;
} else {
m_idWidgetDisplayed = 1;
}
}
if (m_enableSingle == true) {
if (m_enableSingle.get() == true) {
if ( m_idWidgetDisplayed == 0
&& m_subWidget[0] == nullptr
&& m_subWidget[1] != nullptr) {

View File

@ -200,7 +200,7 @@ void ewol::widget::CheckBox::onParameterChangeValue(const ewol::object::Paramete
if (_paramPointer == m_shaper) {
markToRedraw();
} else if (_paramPointer == m_value) {
if (m_value == false) {
if (m_value.get() == false) {
m_idWidgetDisplayed = convertId(0);
} else {
m_idWidgetDisplayed = convertId(1);