------------------------------------------------------------------------
| 115 | |
| 116 | //------------------------------------------------------------------------ |
| 117 | bool path_tokenizer::parse_number() |
| 118 | { |
| 119 | char buf[256]; // Should be enough for any number |
| 120 | char* buf_ptr = buf; |
| 121 | |
| 122 | // Copy all sign characters |
| 123 | while((buf_ptr < buf+255 && *m_path == '-') || *m_path == '+') |
| 124 | { |
| 125 | *buf_ptr++ = *m_path++; |
| 126 | } |
| 127 | |
| 128 | // Copy all numeric characters |
| 129 | while(buf_ptr < buf+255 && is_numeric(*m_path)) |
| 130 | { |
| 131 | *buf_ptr++ = *m_path++; |
| 132 | } |
| 133 | *buf_ptr = 0; |
| 134 | m_last_number = atof(buf); |
| 135 | return true; |
| 136 | } |
| 137 | |
| 138 | |
| 139 | } //namespace svg |
nothing calls this directly
no test coverage detected