Tile& LandOverlay::getTile() const { _OC3_DEBUG_BREAK_IF( !_master_tile && "master tile must be exists" ); return *_master_tile; }
TilePos LandOverlay::getTilePos() const { _OC3_DEBUG_BREAK_IF( !_d->masterTile && "master tile can't be null" ); return _d->masterTile ? _d->masterTile->getIJ() : TilePos( -1, -1 ); }
void FilePath::rename( const FilePath& pathNew ) { _OC3_DEBUG_BREAK_IF( !isExist() ); *this = pathNew; }
// force compile error, prevent Variant(QVariant::Type, int) to be called inline Variant(bool, int) { _OC3_DEBUG_BREAK_IF(true); }
// force compile error, prevent Variant(bool) to be called inline Variant(void *) { _OC3_DEBUG_BREAK_IF(true); }
const Picture& Tile::getPicture() const { _OC3_DEBUG_BREAK_IF( !_picture && "error: picture is null"); return *_picture; }
/** * parseString */ Variant Json::parseString(const std::string &json, int &index, bool &success) { std::string s; char c; Json::eatWhitespace(json, index); c = json[index++]; bool complete = false; while(!complete) { if(index == (int)json.size()) { break; } c = json[index++]; if(c == '\"') { complete = true; break; } else if(c == '\\') { if(index == (int)json.size()) { break; } c = json[index++]; if( c == '\"' || c == '\\' ) { s += c; } else if(c == '/') { s.append("/"); } else if(c == 'b') { s.append("\b"); } else if(c == 'f') { s.append("\f"); } else if(c == 'n') { s.append("\n"); } else if(c == 'r') { s.append("\r"); } else if(c == 't') { s.append("\t"); } else if(c == 'u') { // int remainingLength = json.size() - index; // // if(remainingLength >= 4) // { // std::string unicodeStr = json.substr(index, 4); // // int symbol = StringHelper::fromHex( unicodeStr.c_str() ); // // s.append( symbol ); // // index += 4; // } // else // { // break; // } _OC3_DEBUG_BREAK_IF( true && "yet not work") } } else { s += c; } }
void Widget::remove() { _OC3_DEBUG_BREAK_IF( !getParent() && "parent must be exist for element" ); if( getParent() ) getParent()->removeChild( this ); }