Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrXML
whitespace

Llock
Registered User
Quote
2009-02-02 03:58:52

I'm not exactly sure why, but I was getting lots of values being set that shouldn't. Basically, I removed the if check (against 3) in the top of setText.

That seemed to fix how almost every node was getting \n, \t, etc... and registering that it had text when it didn't.

Example:

     //! sets the state that text was found. Returns true if set should be set
     bool setText(char_type* start, char_type* end)
     {
                // Commented out the below if statement.
                // odds are, we won't spend a LOT of time in this loop, so it's ok since the first
                //  non whitespace char breaks out. - Llock
          //if (end - start)
          {
               char_type* p = start;
               for(; p != end; ++p)
                    if (!isWhiteSpace(*p))
                         break;

               if (p == end)
                    return false;
          }




Good engine, just wanted to file away any changes I'm making locally.


User
Guest
Quote
2012-12-10 20:05:28

This was the problem i discovered in my thread below... hope this helps those who come to it again.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact