Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7265


Ignore:
Timestamp:
Aug 30, 2010, 1:19:11 PM (14 years ago)
Author:
landauf
Message:

added a missing TypeTrait in MultiType which caused problems on some compilers with explicit conversion

Location:
code/branches/consolecommands3/src/libraries
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/Executor.cc

    r7230 r7265  
    6767        }
    6868
     69        COUT(5) << "Executor::parse: \"" << arguments.join(delimiter) << "\" -> " << paramCount << " params: " << param[0] << " / " << param[1] << " / " << param[2] << " / " << param[3] << " / " << param[4] << std::endl;
     70
    6971        switch (paramCount)
    7072        {
     
    9698
    9799        // assign all given arguments to the multitypes
    98         for (unsigned int i = 0; i < std::min(argumentCount, MAX_FUNCTOR_ARGUMENTS); i++)
     100        for (unsigned int i = 0; i < std::min(std::min(argumentCount, paramCount), MAX_FUNCTOR_ARGUMENTS); i++)
    99101            param[i] = arguments[i];
    100102
  • code/branches/consolecommands3/src/libraries/util/MultiType.h

    r7212 r7265  
    321321            inline void                       copy(const MultiType& other)    { if (this == &other) { return; } if (this->value_) { delete this->value_; } this->value_ = (other.value_) ? other.value_->clone() : 0; }
    322322
    323             template <typename T> inline bool convert()                       { return this->setValue<T>((T)(*this));  } /** @brief Converts the current value to type T. */
     323            template <typename T> inline bool convert()                       { return this->setValue<T>((typename Loki::TypeTraits<T>::UnqualifiedReferredType)(*this));  } /** @brief Converts the current value to type T. */
    324324            inline bool                       convert(const MultiType& other) { return this->convert(other.getType()); } /** @brief Converts the current value to the type of the other MultiType. */
    325325            bool                              convert(MT_Type::Value type);
Note: See TracChangeset for help on using the changeset viewer.