src/colors.cpp

changeset 1063
1f15c52c11f6
parent 1062
4119185b56ca
child 1065
c8ecddbd99e9
equal deleted inserted replaced
1062:4119185b56ca 1063:1f15c52c11f6
376 * Returns whether or not there is a token at the given position. 376 * Returns whether or not there is a token at the given position.
377 * If there is, fills in the value parameter with it. 377 * If there is, fills in the value parameter with it.
378 */ 378 */
379 bool LDConfigParser::getToken(QString& tokenText, int position) 379 bool LDConfigParser::getToken(QString& tokenText, int position)
380 { 380 {
381 if (position >= m_tokens.size()) 381 if (position >= length(m_tokens))
382 { 382 {
383 return false; 383 return false;
384 } 384 }
385 else 385 else
386 { 386 {
397 * 397 *
398 * The args parameter specifies how many arguments (i.e. following tokens) the token needs to have. 398 * The args parameter specifies how many arguments (i.e. following tokens) the token needs to have.
399 */ 399 */
400 bool LDConfigParser::findToken(int& tokenPosition, QString needle, int args) 400 bool LDConfigParser::findToken(int& tokenPosition, QString needle, int args)
401 { 401 {
402 for (int i = 0; i < (m_tokens.size() - args); ++i) 402 for (int i = 0; i < (length(m_tokens) - args); ++i)
403 { 403 {
404 if (m_tokens[i] == needle) 404 if (m_tokens[i] == needle)
405 { 405 {
406 tokenPosition = i; 406 tokenPosition = i;
407 return true; 407 return true;

mercurial