[DEBUG] change some comstness error

This commit is contained in:
Edouard DUPIN 2015-01-14 21:10:23 +01:00
parent d58d0e7943
commit 20cfcd5aea
7 changed files with 60 additions and 7 deletions

48
.travis.yml Normal file
View File

@ -0,0 +1,48 @@
# language type:
language: cpp
# compilator system:
compiler:
- clang
- gcc
os:
- linux
- osx
osx_image: xcode61
# previous actions:
before_script:
- rm -rf *
- git clone https://github.com/HeeroYui/ewol.git
- cd ewol; git checkout origin/dev -b dev; cd ..
- cd ewol; git submodule init; cd ..
- cd ewol; git submodule update; cd ..
- cd ewol; git submodule foreach git checkout master; cd ..
- cd ewol; git submodule foreach git pull; cd ..
#install Gcc to have lisstdc++ 4.8 & gcc 4.8
install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.8
- sudo rm /usr/bin/gcc /usr/bin/g++
- sudo ln -s /usr/bin/gcc-4.8 /usr/bin/gcc
- sudo ln -s /usr/bin/g++-4.8 /usr/bin/g++
# build sequence with Lutin :
script:
- if [ "$CXX" == "clang++" ]; then ./ewol/build/lutin.py -C -P -cclang -mdebug -p exml_test; fi
- if [ "$CXX" == "g++" ]; then ./ewol/build/lutin.py -C -P -cgcc -mdebug -p exml_test; fi
after_script:
- if [ "$CXX" == "clang++" ]; then ./out/Linux_x86_64/debug/staging/clang/exml_test/usr/bin/exml_test; fi
- if [ "$CXX" == "g++" ]; then ./out/Linux_x86_64/debug/staging/gcc/exml_test/usr/bin/exml_test; fi
#send e-mail on compilation result:
notifications:
email:
- yui.heero@gmail.com

View File

@ -16,7 +16,7 @@
namespace exml {
class AttributeList : public exml::Node {
public:
protected:
/**
* @brief Constructor
*/
@ -29,6 +29,7 @@ namespace exml {
exml::Node(_value) {
};
public:
/**
* @brief Destructor
*/

View File

@ -138,7 +138,7 @@ void exml::Element::append(const std::shared_ptr<exml::Node>& _node) {
m_listSub.push_back(_node);
}
std::string exml::Element::getText() {
std::string exml::Element::getText() const {
std::string res;
if (m_listSub.size() == 1) {
if (m_listSub[0]->getType() == typeText) {

View File

@ -82,7 +82,7 @@ namespace exml {
* @brief get the internal data of the element (if the element has some sub node thay are converted in xml string == > like this it is not needed to use <![CDATA[...]]>
* @return the curent data string. if Only one text node, then we get the parssed data (no &amp; ...) if more than one node, then we transform &,",',<,> in xml normal text...
*/
std::string getText();
std::string getText() const;
protected:
bool subParse(const std::string& _data, int32_t& _pos, bool _caseSensitive, exml::filePos& _filePos, exml::Document& _doc, bool _mainNode=false);
public: // herited function:

View File

@ -163,7 +163,7 @@ namespace exml {
/**
* @brief get the current position where the element is in the file
*/
const exml::filePos& getPos() {
const exml::filePos& getPos() const {
return m_pos;
};
protected:

View File

@ -63,11 +63,14 @@ static bool isWhiteChar(char32_t _val) {
return false;
}
std::shared_ptr<exml::Text> exml::Text::create() {
return std::shared_ptr<exml::Text>(new exml::Text());
}
std::shared_ptr<exml::Text> exml::Text::create(const std::string& _data) {
return std::shared_ptr<exml::Text>(new exml::Text(_data));
}
bool exml::Text::iGenerate(std::string& _data, int32_t _indent) const {
_data += replaceSpecialCharOut(m_value);
return true;

View File

@ -19,13 +19,14 @@ namespace exml {
* @brief Constructor
*/
Text() { };
public:
static std::shared_ptr<Text> create();
/**
* @brief Constructor
* @param[in] _data String data of the current Text
*/
Text(const std::string& _data) : exml::Node(_data) { };
public:
static std::shared_ptr<Text> create();
static std::shared_ptr<Text> create(const std::string& _data);
/**
* @brief Destructor
*/