scilab: fix warnings

This commit is contained in:
Simon Marchetto 2016-03-14 17:49:05 +01:00
commit 2e556a4cda
2 changed files with 15 additions and 16 deletions

View file

@ -60,14 +60,7 @@ namespace swig
operator T () const
{
try
{
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
}
catch (std::exception& e)
{
SWIG_exception(SWIG_RuntimeError, e.what());
}
return traits_asval_sequenceitem<T>::asval(_seq, piSeqAddr, _index);
}
SciSequence_Ref& operator=(const T& v)
@ -391,14 +384,19 @@ namespace swig {
}
else
{
return true;
return SWIG_ERROR;
}
}
catch (std::exception& e)
{
SWIG_exception(SWIG_RuntimeError, e.what());
return SWIG_ERROR;
}
}
else
{
return SWIG_ERROR;
}
}
};
@ -438,6 +436,7 @@ namespace swig {
catch (std::exception& e)
{
SWIG_exception(SWIG_RuntimeError, e.what());
return SWIG_ERROR;
}
}
};

View file

@ -47,21 +47,21 @@ namespace swig {
// Error returned for sequence containers of default item type
template <typename T> struct traits_as_sequence {
static int check(SwigSciObject obj) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
static int get(SwigSciObject obj, void **sequence) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
static int size(SwigSciObject obj, int *size) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
};
template <typename T> struct traits_from_sequence {
static int create(int size, void **sequence) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
static SwigSciObject set(int size, void *sequence) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
};
@ -136,12 +136,12 @@ namespace swig {
// Error returned for sequence containers of default item type
template <typename T> struct traits_asval_sequenceitem {
static T asval(SwigSciObject obj, void *pSequence, int iItemIndex) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
};
template <typename T> struct traits_from_sequenceitem {
static int from(void *pSequence, int iItemIndex, T itemValue) {
SWIG_Error(SWIG_TypeError, type_name<T>());
throw std::invalid_argument("The container data type is not supported.");
}
};