这篇教程C++ toBool函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中toBool函数的典型用法代码示例。如果您正苦于以下问题:C++ toBool函数的具体用法?C++ toBool怎么用?C++ toBool使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了toBool函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: switch//---------------------------------------------------------------------------------------------------SFBool CFunction::setValueByName(const SFString& fieldName, const SFString& fieldValue){ switch (tolower(fieldName[0])) { case 'a': if ( fieldName % "anonymous" ) { anonymous = toBool(fieldValue); return TRUE; } break; case 'c': if ( fieldName % "constant" ) { constant = toBool(fieldValue); return TRUE; } break; case 'e': if ( fieldName % "encoding" ) { encoding = fieldValue; return TRUE; } break; case 'h': if ( fieldName % "handle" ) { handle = toLong(fieldValue); return TRUE; } break; case 'i': if ( fieldName % "indexed" ) { indexed = toBool(fieldValue); return TRUE; } if ( fieldName % "inputs" ) parseParams(TRUE, fieldValue); return TRUE; break; case 'n': if ( fieldName % "name" ) { name = fieldValue; return TRUE; } break; case 'o': if ( fieldName % "outputs" ) parseParams(FALSE, fieldValue); return TRUE; break; case 't': if ( fieldName % "type" ) { type = fieldValue; return TRUE; } break; default: break; } return FALSE;}
开发者ID:ahuachen,项目名称:ethslurp,代码行数:35,
示例2: fromJsonConfigOpenGLContext OpenGLContext::fromJsonConfig(const QJsonObject & config, JsonParseError * error){ static const auto hasWrongFormat = -1; QSurfaceFormat format{}; format.setRenderableType(QSurfaceFormat::OpenGL); const auto majorVersion = config.value("major").toInt(hasWrongFormat); if (majorVersion == hasWrongFormat) { if (error) *error = { JsonParseError::PropertyNotFoundOrWrongFormat, "major" }; return OpenGLContext{}; } const auto minorVersion = config.value("minor").toInt(hasWrongFormat); if (minorVersion == hasWrongFormat) { if (error) *error = { JsonParseError::PropertyNotFoundOrWrongFormat, "minor" }; return OpenGLContext{}; } format.setVersion(majorVersion, minorVersion); if (format.version() >= qMakePair(3, 2)) { const auto jsonCoreFlag = config.value("core"); const auto profile = jsonCoreFlag.toBool(true) ? QSurfaceFormat::CoreProfile : QSurfaceFormat::CompatibilityProfile; format.setProfile(profile); } if (format.version() >= qMakePair(3, 0)) { const auto jsonForwardFlag = config.value("forward"); if (jsonForwardFlag.toBool(false)) format.setOption(QSurfaceFormat::DeprecatedFunctions); } const auto jsonDebugFlag = config.value("debug"); if (jsonDebugFlag.toBool(false)) format.setOption(QSurfaceFormat::DebugContext); auto context = OpenGLContext{}; context.setFormat(format); if (error) *error = JsonParseError::NoError; return context;}
开发者ID:SebSchmech,项目名称:gloperate,代码行数:59,
示例3: VG_/* Uh, this doesn't do anything at all. IIRC glibc (or ld.so, I don't remember) does a bunch of mprotects on itself, and if we follow through here, it causes the debug info for that object to get discarded. */void VG_(di_notify_mprotect)( Addr a, SizeT len, UInt prot ){ Bool exe_ok = toBool(prot & VKI_PROT_EXEC);# if defined(VGP_x86_linux) exe_ok = exe_ok || toBool(prot & VKI_PROT_READ);# endif if (0 && !exe_ok) discard_syms_in_range(a, len);}
开发者ID:svn2github,项目名称:valgrind-3,代码行数:13,
示例4: setURLvoid Image3DOverlay::setProperties(const QVariantMap& properties) { Billboard3DOverlay::setProperties(properties); auto urlValue = properties["url"]; if (urlValue.isValid()) { QString newURL = urlValue.toString(); if (newURL != _url) { setURL(newURL); } } auto subImageBoundsVar = properties["subImage"]; if (subImageBoundsVar.isValid()) { if (subImageBoundsVar.isNull()) { _fromImage = QRect(); } else { QRect oldSubImageRect = _fromImage; QRect subImageRect = _fromImage; auto subImageBounds = subImageBoundsVar.toMap(); if (subImageBounds["x"].isValid()) { subImageRect.setX(subImageBounds["x"].toInt()); } else { subImageRect.setX(oldSubImageRect.x()); } if (subImageBounds["y"].isValid()) { subImageRect.setY(subImageBounds["y"].toInt()); } else { subImageRect.setY(oldSubImageRect.y()); } if (subImageBounds["width"].isValid()) { subImageRect.setWidth(subImageBounds["width"].toInt()); } else { subImageRect.setWidth(oldSubImageRect.width()); } if (subImageBounds["height"].isValid()) { subImageRect.setHeight(subImageBounds["height"].toInt()); } else { subImageRect.setHeight(oldSubImageRect.height()); } setClipFromSource(subImageRect); } } auto keepAspectRatioValue = properties["keepAspectRatio"]; if (keepAspectRatioValue.isValid()) { _keepAspectRatio = keepAspectRatioValue.toBool(); } auto emissiveValue = properties["emissive"]; if (emissiveValue.isValid()) { _emissive = emissiveValue.toBool(); }}
开发者ID:Nex-Pro,项目名称:hifi,代码行数:53,
示例5: notify_tool_of_mmapstatic void notify_tool_of_mmap(Addr a, SizeT len, UInt prot, ULong di_handle){ Bool rr, ww, xx; /* 'a' is the return value from a real kernel mmap, hence: */ vg_assert(VG_IS_PAGE_ALIGNED(a)); /* whereas len is whatever the syscall supplied. So: */ len = VG_PGROUNDUP(len); rr = toBool(prot & VKI_PROT_READ); ww = toBool(prot & VKI_PROT_WRITE); xx = toBool(prot & VKI_PROT_EXEC); VG_TRACK( new_mem_mmap, a, len, rr, ww, xx, di_handle );}
开发者ID:AboorvaDevarajan,项目名称:valgrind,代码行数:15,
示例6: parser ActorProto::ActorProto(const TupleParser &parser) :ProtoImpl(parser, true) { punch_weapon = parser("punch_weapon"); kick_weapon = parser("kick_weapon"); sound_prefix = parser("sound_prefix"); is_heavy = toBool(parser("is_heavy")); is_alive = toBool(parser("is_alive")); float4 speed_vec = toFloat4(parser("speeds")); speeds[0] = speed_vec.x; speeds[1] = speed_vec.y; speeds[2] = speed_vec.z; speeds[3] = speed_vec.w; hit_points = toFloat(parser("hit_points")); }
开发者ID:dreamsxin,项目名称:FreeFT,代码行数:15,
示例7: variable_data_factoryTensor variable_data_factory(const Type& type, PyObject* args, PyObject* kwargs) { static PythonArgParser parser({ "new(Tensor other, *, bool requires_grad=False)", "new(PyObject* data, *, int64_t device=-1, bool requires_grad=False)", }); PyObject* parsed_args[3]; auto r = parser.parse(args, kwargs, parsed_args); if (r.idx == 0) { return set_requires_grad(new_with_tensor_copy(type, r.tensor(0)), r.toBool(1)); return set_requires_grad(new_with_tensor(type, r.tensor(0)), r.toBool(1)); } else if (r.idx == 1) { return set_requires_grad(new_from_data(type, r.toInt64(1), r.pyobject(0)), r.toBool(2)); } throw std::runtime_error("variable(): invalid arguments");}
开发者ID:bhuWenDongchao,项目名称:pytorch,代码行数:16,
示例8: toBoolResource* TiledFont::GetFont(File* f, Kvp kvp) { bool monosized = toBool(GetKv(kvp, "monosized")); char* charset = 0; auto cs = GetKv(kvp, "charset"); if(!cs.empty()) { charset = (char*)cs.c_str(); } int fontsize = 13; auto fs = GetKv(kvp, "fontsize"); if(!fs.empty()) { fontsize = std::stoi(fs); } auto bgc = GetKv(kvp, "bgcolor"); unsigned int bg_key = 0; if(!bgc.empty()) { bg_key = Color(bgc).GetUint32(); } Size tilesize = {64,64}; auto ts = GetKv(kvp, "tilesize"); std::vector<std::string> vs; split_string(ts, vs, ','); if(vs.size() == 2) { tilesize.w = std::stoi(vs[0]); tilesize.h = std::stoi(vs[1]); } std::cout << "loading tiledfont: " << f->path << "/n"; Image* img = Images::GetImage(f->path); if(!img) { return 0; } return new TiledFont(img, tilesize, bg_key, fontsize, monosized, charset);}
开发者ID:112212,项目名称:simple-gui-engine,代码行数:35,
示例9: toBoolKOKKOS_INLINE_FUNCTIONbooloperator || (const PCE<Storage>& x1, const typename PCE<Storage>::value_type& b){ return toBool(x1) || b;}
开发者ID:agrippa,项目名称:Trilinos,代码行数:7,
示例10: ElLUModDist_zSEXP lUModDist_z( SEXP RptrA, SEXP Rptrp, SEXP Rptru, SEXP Rptrv, SEXP conjugate, SEXP tau ){ ElLUModDist_z( toDistMatrix_z(RptrA), toDistPermutation(Rptrp), toDistMatrix_z(Rptru), toDistMatrix_z(Rptrv), toBool(conjugate), toDouble(tau) ); return R_NilValue;}
开发者ID:rocanale,项目名称:RElem,代码行数:7,
示例11: ElMultiplyAfterLDLPivDist_zSEXP multiplyAfterLDLPivDist_z( SEXP RptrA, SEXP RptrdSub, SEXP Rptrp, SEXP RptrB, SEXP conjugate ){ ElMultiplyAfterLDLPivDist_z( toDistMatrix_z(RptrA), toDistMatrix_z(RptrdSub), toDistPermutation(Rptrp), toDistMatrix_z(RptrB), toBool(conjugate) ); return R_NilValue;}
开发者ID:rocanale,项目名称:RElem,代码行数:7,
示例12: ElSolveAfterLDLPiv_zSEXP solveAfterLDLPiv_z( SEXP RptrA, SEXP RptrdSub, SEXP Rptrp, SEXP RptrB, SEXP conjugate ){ ElSolveAfterLDLPiv_z( toMatrix_z(RptrA), toMatrix_z(RptrdSub), toPermutation(Rptrp), toMatrix_z(RptrB), toBool(conjugate) ); return R_NilValue;}
开发者ID:rocanale,项目名称:RElem,代码行数:7,
示例13: toBoolbool ConfigDomain::getBool(const UString &key, bool def) const { UString value; if (!getKey(key, value)) return def; return toBool(value);}
开发者ID:jjardon,项目名称:eos,代码行数:7,
示例14: createFormImpl/*! Creates a set-call for property /a exclusiveProp of the object given in /a e. If the object does not have this property, the function does nothing. Exclusive properties are used to generate the implementation of application font or palette change handlers in createFormImpl(). */void Uic::createExclusiveProperty( const QDomElement & e, const QString& exclusiveProp ){ QDomElement n; QString objClass = getClassName( e ); if ( objClass.isEmpty() ) return; QString objName = getObjectName( e );#if 0 // it's not clear whether this check should be here or not if ( objName.isEmpty() ) return;#endif for ( n = e.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "property" ) { bool stdset = stdsetdef; if ( n.hasAttribute( "stdset" ) ) stdset = toBool( n.attribute( "stdset" ) ); QString prop = n.attribute( "name" ); if ( prop != exclusiveProp ) continue; QString value = setObjectProperty( objClass, objName, prop, n.firstChild().toElement(), stdset ); if ( value.isEmpty() ) continue; // we assume the property isn't of type 'string' out << '/t' << objName << "->setProperty( /"" << prop << "/", " << value << " );" << endl; } }}
开发者ID:AliYousuf,项目名称:univ-aca-mips,代码行数:37,
示例15: timerMenuActiveEffects::MenuActiveEffects(StatBlock *_stats) : timer(NULL) , stats(_stats) , orientation(false) { // horizontal // Load config settings FileParser infile; // @CLASS MenuActiveEffects|Description of menus/activeeffects.txt if(infile.open("menus/activeeffects.txt")) { while(infile.next()) { if (parseMenuKey(infile.key, infile.val)) continue; // @ATTR orientation|bool|True is vertical orientation; False is horizontal orientation. if(infile.key == "orientation") { orientation = toBool(infile.val); } else { infile.error("MenuActiveEffects: '%s' is not a valid key.", infile.key.c_str()); } } infile.close(); } loadGraphics(); align();}
开发者ID:LungTakumi,项目名称:flare-engine,代码行数:26,
示例16: propertyMapvoid DatabaseInfo::acceptWidget(DomWidget *node){ QHash<QString, DomProperty*> properties = propertyMap(node->elementProperty()); DomProperty *frameworkCode = properties.value(QLatin1String("frameworkCode"), 0); if (frameworkCode && toBool(frameworkCode->elementBool()) == false) return; DomProperty *db = properties.value(QLatin1String("database"), 0); if (db && db->elementStringList()) { QStringList info = db->elementStringList()->elementString(); QString connection = info.size() > 0 ? info.at(0) : QString(); if (connection.isEmpty()) return; m_connections.append(connection); QString table = info.size() > 1 ? info.at(1) : QString(); if (table.isEmpty()) return; m_cursors[connection].append(table); QString field = info.size() > 2 ? info.at(2) : QString(); if (field.isEmpty()) return; m_fields[connection].append(field); } TreeWalker::acceptWidget(node);}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:30,
示例17: FontEngineSDLFontEngine::SDLFontEngine() : FontEngine(), active_font(NULL) { // Initiate SDL_ttf if(!TTF_WasInit() && TTF_Init()==-1) { logError("SDLFontEngine: TTF_Init: %s", TTF_GetError()); Exit(2); } // load the fonts // @CLASS SDLFontEngine: Font settings|Description of engine/font_settings.txt FileParser infile; if (infile.open("engine/font_settings.txt")) { while (infile.next()) { if (infile.new_section) { SDLFontStyle f; f.name = infile.section; font_styles.push_back(f); } if (font_styles.empty()) continue; SDLFontStyle *style = &(font_styles.back()); if ((infile.key == "default" && style->path == "") || infile.key == LANGUAGE) { // @ATTR $STYLE.default, $STYLE.$LANGUAGE|filename (string), point size (integer), blending (boolean)|Filename, point size, and blend mode of the font to use for this language. $STYLE can be something like "font_normal" or "font_bold". $LANGUAGE can be a 2-letter region code. style->path = popFirstString(infile.val); style->ptsize = popFirstInt(infile.val); style->blend = toBool(popFirstString(infile.val)); style->ttfont = TTF_OpenFont(mods->locate("fonts/" + style->path).c_str(), style->ptsize); if(style->ttfont == NULL) { logError("FontEngine: TTF_OpenFont: %s", TTF_GetError()); } else { int lineskip = TTF_FontLineSkip(style->ttfont); style->line_height = lineskip; style->font_height = lineskip; } } } infile.close(); } // set the font colors Color color; if (infile.open("engine/font_colors.txt")) { while (infile.next()) { // @ATTR menu_normal, menu_bonus, menu_penalty, widget_normal, widget_disabled|r (integer), g (integer), b (integer)|Colors for menus and widgets // @ATTR combat_givedmg, combat_takedmg, combat_crit, combat_buff, combat_miss|r (integer), g (integer), b (integer)|Colors for combat text // @ATTR requirements_not_met, item_bonus, item_penalty, item_flavor|r (integer), g (integer), b (integer)|Colors for tooltips // @ATTR item_$QUALITY|r (integer), g (integer), b (integer)|Colors for item quality. $QUALITY should match qualities used in items/items.txt color_map[infile.key] = toRGB(infile.val); } infile.close(); } // Attempt to set the default active font setFont("font_regular"); if (!active_font) { logError("FontEngine: Unable to determine default font!"); Exit(1); }}
开发者ID:mactec0,项目名称:flare-engine,代码行数:60,
示例18: PluginConfigvoid leagueOverSeer::loadConfig(const char* cmdLine) //Load the plugin configuration file{ PluginConfig config = PluginConfig(cmdLine); std::string section = "leagueOverSeer"; if (config.errors) bz_shutdown(); //Shutdown the server //Extract all the data in the configuration file and assign it to plugin variables rotLeague = toBool(config.item(section, "ROTATIONAL_LEAGUE")); mapchangePath = config.item(section, "MAPCHANGE_PATH"); SQLiteDB = config.item(section, "SQLITE_DB"); LEAGUE_URL = config.item(section, "LEAGUE_OVER_SEER_URL"); DEBUG = atoi((config.item(section, "DEBUG_LEVEL")).c_str()); //Check for errors in the configuration data. If there is an error, shut down the server if (strcmp(LEAGUE_URL.c_str(), "") == 0) { bz_debugMessage(0, "*** DEBUG :: League Over Seer :: No URLs were choosen to report matches or query teams. ***"); bz_shutdown(); } if (DEBUG > 4 || DEBUG < 0) { bz_debugMessage(0, "*** DEBUG :: League Over Seer :: Invalid debug level in the configuration file. ***"); bz_shutdown(); }}
开发者ID:blast007,项目名称:leagueOverSeer,代码行数:26,
示例19: loadStatevoid AnimeListWidget::loadState() { QString table_key = "states/"; QString width_key = m_list + "_stateWidth_"; QString hidden_key = m_list + "_stateVisible_"; width_key.replace(QRegExp("[ ]+"), ""); hidden_key.replace(QRegExp("[ ]+"), ""); QSettings settings; for (int i = 0; i < m_model->columnCount(); ++i) { auto width = settings.value(table_key + width_key + QString::number(i)); auto hidden = settings.value(table_key + hidden_key + QString::number(i)); if (settings.contains(table_key + hidden_key + QString::number(i))) { m_ui->table->setColumnHidden(i, hidden.toBool()); } else { m_ui->table->setColumnHidden(i, m_model->defaultHidden(i)); } if (settings.contains(table_key + width_key + QString::number(i))) { m_ui->table->setColumnWidth(i, width.toInt()); } }}
开发者ID:NotLemon,项目名称:Shinjiru,代码行数:25,
示例20: restoreStatevoid DistViewGUI::restoreState(){ QSettings settings; settings.beginGroup("DistView_" + representation::str(type)); auto hq = settings.value("HQDrawing", true); auto log = settings.value("LogDrawing", false); auto alpha = settings.value("alphaModifier", 50); auto nbins = settings.value("NBins", 64); settings.endGroup(); uivc->actionHq->setChecked(hq.toBool()); uivc->actionLog->setChecked(log.toBool()); uivc->alphaSlider->setValue(alpha.toInt()); uivc->binSlider->setValue(nbins.toInt());}
开发者ID:philippefoubert,项目名称:gerbil,代码行数:16,
示例21: guardbool hkbGetWorldFromModelModifier::readData(const HkxXmlReader &reader, long & index){ std::lock_guard <std::mutex> guard(mutex); bool ok; QByteArray text; auto ref = reader.getNthAttributeValueAt(index - 1, 0); auto checkvalue = [&](bool value, const QString & fieldname){ (!value) ? LogFile::writeToLog(getParentFilename()+": "+getClassname()+": readData()!/n'"+fieldname+"' has invalid data!/nObject Reference: "+ref) : NULL; }; for (; index < reader.getNumElements() && reader.getNthAttributeNameAt(index, 1) != "class"; index++){ text = reader.getNthAttributeValueAt(index, 0); if (text == "variableBindingSet"){ checkvalue(getVariableBindingSet().readShdPtrReference(index, reader), "variableBindingSet"); }else if (text == "userData"){ userData = reader.getElementValueAt(index).toULong(&ok); checkvalue(ok, "userData"); }else if (text == "name"){ name = reader.getElementValueAt(index); checkvalue((name != ""), "name"); }else if (text == "enable"){ enable = toBool(reader.getElementValueAt(index), &ok); checkvalue(ok, "enable"); }else if (text == "translationOut"){ translationOut = readVector4(reader.getElementValueAt(index), &ok); checkvalue(ok, "translationOut"); }else if (text == "rotationOut"){ rotationOut = readVector4(reader.getElementValueAt(index), &ok); checkvalue(ok, "rotationOut"); } } index--; return true;}
开发者ID:Zartar,项目名称:Skyrim-Behavior-Editor-,代码行数:32,
示例22: sfx_lootLootManager::LootManager() : sfx_loot(0) , drop_max(1) , drop_radius(1) , hero(NULL) , tooltip_margin(0){ tip = new WidgetTooltip(); FileParser infile; // load loot animation settings from engine config file // @CLASS Loot|Description of engine/loot.txt if (infile.open("engine/loot.txt")) { while (infile.next()) { if (infile.key == "tooltip_margin") { // @ATTR tooltip_margin|integer|Vertical offset of the loot tooltip from the loot itself. tooltip_margin = toInt(infile.val); } else if (infile.key == "autopickup_currency") { // @ATTR autopickup_currency|boolean|Enable autopickup for currency AUTOPICKUP_CURRENCY = toBool(infile.val); } else if (infile.key == "currency_name") { // This key is parsed in loadMiscSettings() in Settings.cpp } else if (infile.key == "vendor_ratio") { // @ATTR vendor_ratio|integer|Prices ratio for vendors VENDOR_RATIO = static_cast<float>(toInt(infile.val)) / 100.0f; } else if (infile.key == "sfx_loot") { // @ATTR sfx_loot|string|Filename of a sound effect to play for dropping loot. sfx_loot = snd->load(infile.val, "LootManager dropping loot"); } else if (infile.key == "drop_max") { // @ATTR drop_max|integer|The maximum number of random item stacks that can drop at once drop_max = toInt(infile.val); clampFloor(drop_max, 1); } else if (infile.key == "drop_radius") { // @ATTR drop_radius|integer|The distance (in tiles) away from the origin that loot can drop drop_radius = toInt(infile.val); clampFloor(drop_radius, 1); } else { infile.error("LootManager: '%s' is not a valid key.", infile.key.c_str()); } } infile.close(); } // reset current map loot loot.clear(); loadGraphics(); full_msg = false; loadLootTables();}
开发者ID:Jeffry84,项目名称:flare-engine,代码行数:59,
示例23: Q_UNUSEDvoid SceneryCfg::onKeyValue(const QString& section, const QString& sectionSuffix, const QString& key, const QString& value){ Q_UNUSED(sectionSuffix); if(section == "general") { if(key == "title") title = key; else if(key == "description") description = value; else if(key == "clean_on_exit") cleanOnExit = toBool(value); else qWarning() << "Unexpected key" << key << "in section" << section << "file" << filename; } else if(section == "area") { if(key == "title") currentArea.title = value; else if(key == "texture_id") currentArea.textureId = toInt(value); else if(key == "remote") currentArea.remotePath = value; else if(key == "local") {#ifdef Q_OS_UNIX currentArea.localPath = QString(value).replace("//", "/");#else currentArea.localPath = value;#endif } else if(key == "layer") currentArea.layer = toInt(value); else if(key == "active") currentArea.active = toBool(value); else if(key == "required") currentArea.required = toBool(value); else if(key == "exclude") currentArea.exclude = value; else qWarning() << "Unexpected key" << key << "in section" << section << "file" << filename; } else qWarning() << "Unexpected section" << section << "file" << filename;}
开发者ID:albar965,项目名称:atools,代码行数:45,
示例24: toBool/** * Check if the hero can move during this dialog branch */bool NPC::checkMovement(unsigned int dialog_node) { if (dialog_node < dialog.size()) { for (unsigned int i=0; i<dialog[dialog_node].size(); i++) { if (dialog[dialog_node][i].type == EC_NPC_ALLOW_MOVEMENT) return toBool(dialog[dialog_node][i].s); } } return true;}
开发者ID:puwei,项目名称:flare-engine,代码行数:12,
示例25: bool OsmAnd::MapStyleEvaluationResult::getBooleanValue(const int valueDefId, bool& value) const{ const auto itValue = _d->_values.constFind(valueDefId); if(itValue == _d->_values.cend()) return false; value = itValue->toBool(); return true;}
开发者ID:TAstylex,项目名称:OsmAnd-core,代码行数:9,
示例26: getbool InetfsProperties::hasBool(const char *name){ string value; int status = get(string(name), value); if (status <= 0) { return false; } return toBool(value.c_str());}
开发者ID:rallan9,项目名称:inetfs,代码行数:10,
示例27: buiIfNode * buiIf(ListNode * args, Env * env){ if (len((Node *) args) < 2 || len((Node *) args) > 3) { error("*** ERROR:if:","Illegal form"); return NULL; } Node * t = eval(args->car, env); if (t->type == BOOL && toBool(t)->value == 0) return eval(args->cddar, env); else return eval(args->cdar, env);}
开发者ID:keroro520,项目名称:Compiler_NirLauncher,代码行数:10,
注:本文中的toBool函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ toCSSImageValue函数代码示例 C++ toBARK函数代码示例 |