Changeset 69:b9bd564ea70c in rrlib_xml


Ignore:
Timestamp:
06.02.2021 21:29:59 (17 months ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Phase:
public
Message:

Fixes compiler warnings that appear with additional non-default warning options enabled

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tDocument.cpp

    r64 r69  
    199199    xmlXPathFreeObject(ptr); 
    200200  }; // clean up the XPath object 
    201   std::unique_ptr<xmlXPathObject, decltype(cleanup_path_object)> xpath_object(xmlXPathEvalExpression((xmlChar*)name.c_str(), xpath_context.get()), cleanup_path_object); // create and initialize an XPath object as query result with auto cleanup 
     201  std::unique_ptr<xmlXPathObject, decltype(cleanup_path_object)> xpath_object(xmlXPathEvalExpression(reinterpret_cast<xmlChar*>(const_cast<char*>(name.c_str())), xpath_context.get()), cleanup_path_object); // create and initialize an XPath object as query result with auto cleanup 
    202202 
    203203  if (xpath_object == nullptr) 
  • tNode.cpp

    r57 r69  
    7979// tNode IsInSubtreeOf 
    8080//---------------------------------------------------------------------- 
    81 const bool tNode::IsInSubtreeOf(const tNode &node) const 
     81bool tNode::IsInSubtreeOf(const tNode &node) const 
    8282{ 
    8383  const tNode *current_node = this; 
  • tNode.h

    r66 r69  
    139139    } 
    140140 
    141     inline const bool operator == (const iterator &other) const 
     141    inline bool operator == (const iterator &other) const 
    142142    { 
    143143      return element == other.element; 
    144144    } 
    145     inline const bool operator != (const iterator &other) const 
     145    inline bool operator != (const iterator &other) const 
    146146    { 
    147147      return !(*this == other); 
     
    190190    } 
    191191 
    192     inline const bool operator == (const const_iterator &other) const 
     192    inline bool operator == (const const_iterator &other) const 
    193193    { 
    194194      return element == other.element; 
    195195    } 
    196     inline const bool operator != (const const_iterator &other) const 
     196    inline bool operator != (const const_iterator &other) const 
    197197    { 
    198198      return !(*this == other); 
     
    247247   * \returns Whether \a this is contained within the subtree of \a node 
    248248   */ 
    249   const bool IsInSubtreeOf(const tNode &node) const; 
     249  bool IsInSubtreeOf(const tNode &node) const; 
    250250 
    251251  /*! Get the name of this node 
     
    321321   * \returns Whether \a this has children or not 
    322322   */ 
    323   inline const bool HasChildren() const 
     323  inline bool HasChildren() const 
    324324  { 
    325325    return this->ChildrenBegin() != this->ChildrenEnd(); 
     
    332332   *  \returns The number of XML nodes reachable as children of this node 
    333333   */ 
    334   inline const size_t GetNumberOfChildren() const 
     334  inline size_t GetNumberOfChildren() const 
    335335  { 
    336336    return std::distance(this->ChildrenBegin(), this->ChildrenEnd()); 
     
    441441   * \returns Whether a sibling is reachable or not 
    442442   */ 
    443   inline const bool HasNextSibling() const 
     443  inline bool HasNextSibling() const 
    444444  { 
    445445    return this->NextSiblingsBegin() != this->NextSiblingsEnd(); 
     
    527527   * \returns Whether this node has the given attribute or not 
    528528   */ 
    529   inline const bool HasAttribute(const std::string &name) const 
     529  inline bool HasAttribute(const std::string &name) const 
    530530  { 
    531531    return xmlHasProp(const_cast<tNode *>(this), reinterpret_cast<const xmlChar *>(name.c_str())) != 0; 
     
    567567   * \returns The attribute as int 
    568568   */ 
    569   inline const int GetIntAttribute(const std::string &name, int base = 10) const 
     569  inline int GetIntAttribute(const std::string &name, int base = 10) const 
    570570  { 
    571571    return this->GetLongIntAttribute(name, base); 
     
    584584   * \returns The attribute as long int 
    585585   */ 
    586   inline const long int GetLongIntAttribute(const std::string &name, int base = 10) const 
     586  inline long int GetLongIntAttribute(const std::string &name, int base = 10) const 
    587587  { 
    588588    return tNode::ConvertStringToNumber(this->GetStringAttribute(name), std::strtol, base); 
     
    602602   * \returns The attribute as long long int 
    603603   */ 
    604   inline const long long int GetLongLongIntAttribute(const std::string &name, int base = 10) const 
     604  inline long long int GetLongLongIntAttribute(const std::string &name, int base = 10) const 
    605605  { 
    606606    return tNode::ConvertStringToNumber(this->GetStringAttribute(name), std::strtoll, base); 
     
    618618   * \returns The attribute as float 
    619619   */ 
    620   inline const float GetFloatAttribute(const std::string &name) const 
     620  inline float GetFloatAttribute(const std::string &name) const 
    621621  { 
    622622    return tNode::ConvertStringToNumber(this->GetStringAttribute(name), std::strtof); 
     
    634634   * \returns The attribute as double 
    635635   */ 
    636   inline const double GetDoubleAttribute(const std::string &name) const 
     636  inline double GetDoubleAttribute(const std::string &name) const 
    637637  { 
    638638    return tNode::ConvertStringToNumber(this->GetStringAttribute(name), std::strtod); 
     
    650650   * \returns The attribute as long double 
    651651   */ 
    652   inline const long double GetLongDoubleAttribute(const std::string &name) const 
     652  inline long double GetLongDoubleAttribute(const std::string &name) const 
    653653  { 
    654654    return tNode::ConvertStringToNumber(this->GetStringAttribute(name), std::strtold); 
     
    716716   * \returns Whether the attribute's value was "true" or "false" 
    717717   */ 
    718   inline const bool GetBoolAttribute(const std::string &name) const 
     718  inline bool GetBoolAttribute(const std::string &name) const 
    719719  { 
    720720    static const std::vector<std::string> bool_names = { "false", "true" }; 
Note: See TracChangeset for help on using the changeset viewer.