• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NOTREACHED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NOTREACHED函数的典型用法代码示例。如果您正苦于以下问题:C++ NOTREACHED函数的具体用法?C++ NOTREACHED怎么用?C++ NOTREACHED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NOTREACHED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: accessFillLayer

static FillLayer* accessFillLayer(CSSPropertyID property,
                                  ComputedStyle& style) {
  switch (property) {
    case CSSPropertyBackgroundSize:
      return &style.accessBackgroundLayers();
    case CSSPropertyWebkitMaskSize:
      return &style.accessMaskLayers();
    default:
      NOTREACHED();
      return nullptr;
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:12,代码来源:SizeListPropertyFunctions.cpp


示例2: switch

String MIDIPort::state() const {
  switch (m_state) {
    case PortState::DISCONNECTED:
      return "disconnected";
    case PortState::CONNECTED:
      return "connected";
    case PortState::OPENED:
      NOTREACHED();
      return "connected";
  }
  return emptyString();
}
开发者ID:ollie314,项目名称:chromium,代码行数:12,代码来源:MIDIPort.cpp


示例3: SetMsgHandled

    void NativeTextfieldWin::OnSetFocus(HWND hwnd)
    {
        SetMsgHandled(FALSE); // We still want the default processing of the message.

        FocusManager* focus_manager = textfield_->GetFocusManager();
        if(!focus_manager)
        {
            NOTREACHED();
            return;
        }
        focus_manager->SetFocusedView(textfield_);
    }
开发者ID:abyvaltsev,项目名称:putty-nd3.x,代码行数:12,代码来源:native_textfield_win.cpp


示例4: NOTREACHED

    void FocusManager::UnregisterAccelerator(const Accelerator& accelerator,
        AcceleratorTarget* target)
    {
        AcceleratorMap::iterator map_iter = accelerators_.find(accelerator);
        if(map_iter == accelerators_.end())
        {
            NOTREACHED() << "Unregistering non-existing accelerator";
            return;
        }

        AcceleratorTargetList* targets = &map_iter->second;
        AcceleratorTargetList::iterator target_iter =
            std::find(targets->begin(), targets->end(), target);
        if(target_iter == targets->end())
        {
            NOTREACHED() << "Unregistering accelerator for wrong target";
            return;
        }

        targets->erase(target_iter);
    }
开发者ID:Strongc,项目名称:Chrome_Library,代码行数:21,代码来源:focus_manager.cpp


示例5: getFillLayer

static const FillLayer* getFillLayer(CSSPropertyID property,
                                     const ComputedStyle& style) {
  switch (property) {
    case CSSPropertyBackgroundSize:
      return &style.backgroundLayers();
    case CSSPropertyWebkitMaskSize:
      return &style.maskLayers();
    default:
      NOTREACHED();
      return nullptr;
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:12,代码来源:SizeListPropertyFunctions.cpp


示例6: switch

InterpolationValue FilterInterpolationFunctions::maybeConvertFilter(
    const FilterOperation& filter,
    double zoom) {
  InterpolationValue result = nullptr;

  switch (filter.type()) {
    case FilterOperation::GRAYSCALE:
    case FilterOperation::HUE_ROTATE:
    case FilterOperation::SATURATE:
    case FilterOperation::SEPIA:
      result.interpolableValue = InterpolableNumber::create(
          toBasicColorMatrixFilterOperation(filter).amount());
      break;

    case FilterOperation::BRIGHTNESS:
    case FilterOperation::CONTRAST:
    case FilterOperation::INVERT:
    case FilterOperation::OPACITY:
      result.interpolableValue = InterpolableNumber::create(
          toBasicComponentTransferFilterOperation(filter).amount());
      break;

    case FilterOperation::BLUR:
      result = LengthInterpolationFunctions::maybeConvertLength(
          toBlurFilterOperation(filter).stdDeviation(), zoom);
      break;

    case FilterOperation::DROP_SHADOW: {
      const DropShadowFilterOperation& blurFilter =
          toDropShadowFilterOperation(filter);
      ShadowData shadowData(blurFilter.location(), blurFilter.stdDeviation(), 0,
                            Normal, blurFilter.getColor());
      result =
          ShadowInterpolationFunctions::convertShadowData(shadowData, zoom);
      break;
    }

    case FilterOperation::REFERENCE:
      return nullptr;

    default:
      NOTREACHED();
      return nullptr;
  }

  if (!result)
    return nullptr;

  result.nonInterpolableValue = FilterNonInterpolableValue::create(
      filter.type(), result.nonInterpolableValue.release());
  return result;
}
开发者ID:mirror,项目名称:chromium,代码行数:52,代码来源:FilterInterpolationFunctions.cpp


示例7: switch

String Notification::dir() const {
  switch (m_data.direction) {
    case WebNotificationData::DirectionLeftToRight:
      return "ltr";
    case WebNotificationData::DirectionRightToLeft:
      return "rtl";
    case WebNotificationData::DirectionAuto:
      return "auto";
  }

  NOTREACHED();
  return String();
}
开发者ID:ollie314,项目名称:chromium,代码行数:13,代码来源:Notification.cpp


示例8: NOTREACHED

void SQLiteDatabase::setAuthorizer(DatabaseAuthorizer* auth)
{
    if (!m_db) {
        NOTREACHED() << "Attempt to set an authorizer on a non-open SQL database";
        return;
    }

    MutexLocker locker(m_authorizerLock);

    m_authorizer = auth;

    enableAuthorizer(true);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:13,代码来源:SQLiteDatabase.cpp


示例9: toV8

v8::Local<v8::Value> toV8(const NodeOrNodeList& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) {
  switch (impl.m_type) {
    case NodeOrNodeList::SpecificTypeNone:
      return v8::Null(isolate);
    case NodeOrNodeList::SpecificTypeNode:
      return toV8(impl.getAsNode(), creationContext, isolate);
    case NodeOrNodeList::SpecificTypeNodeList:
      return toV8(impl.getAsNodeList(), creationContext, isolate);
    default:
      NOTREACHED();
  }
  return v8::Local<v8::Value>();
}
开发者ID:mirror,项目名称:chromium,代码行数:13,代码来源:NodeOrNodeList.cpp


示例10: NOTREACHED

ConnectionBaseWidget* ConnectionWidgetsFactory::createWidget(proxy::IConnectionSettingsBase* connection,
                                                             QWidget* parent) {
  if (!connection) {
    NOTREACHED();
    return nullptr;
  }

  core::connectionTypes type = connection->GetType();
  ConnectionBaseWidget* widget = createWidgetImpl(type, parent);
  widget->syncControls(connection);
  widget->retranslateUi();
  return widget;
}
开发者ID:mdvx,项目名称:fastonosql,代码行数:13,代码来源:connection_widgets_factory.cpp


示例11: NOTREACHED

common::Error LmdbRaw::info(const char* args, LmdbServerInfo::Stats* statsout) {
  if (!statsout) {
    NOTREACHED();
    return common::make_error_value("Invalid input argument for command: INFO",
                                    common::ErrorValue::E_ERROR);
  }

  LmdbServerInfo::Stats linfo;
  linfo.file_name = config_.dbname;

  *statsout = linfo;
  return common::Error();
}
开发者ID:kunyuqiushuang,项目名称:fastonosql,代码行数:13,代码来源:lmdb_raw.cpp


示例12: switch

String SourceInfo::kind() const {
  switch (m_webSourceInfo.kind()) {
    case WebSourceInfo::SourceKindAudio:
      return "audio";
    case WebSourceInfo::SourceKindVideo:
      return "video";
    case WebSourceInfo::SourceKindNone:
      return "none";
  }

  NOTREACHED();
  return String();
}
开发者ID:ollie314,项目名称:chromium,代码行数:13,代码来源:SourceInfo.cpp


示例13: toV8

v8::Local<v8::Value> toV8(const TestInterfaceGarbageCollectedOrString& impl, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) {
  switch (impl.m_type) {
    case TestInterfaceGarbageCollectedOrString::SpecificTypeNone:
      return v8::Null(isolate);
    case TestInterfaceGarbageCollectedOrString::SpecificTypeTestInterfaceGarbageCollected:
      return toV8(impl.getAsTestInterfaceGarbageCollected(), creationContext, isolate);
    case TestInterfaceGarbageCollectedOrString::SpecificTypeString:
      return v8String(isolate, impl.getAsString());
    default:
      NOTREACHED();
  }
  return v8::Local<v8::Value>();
}
开发者ID:mirror,项目名称:chromium,代码行数:13,代码来源:TestInterfaceGarbageCollectedOrString.cpp


示例14: switch

String SecurityContext::addressSpaceForBindings() const {
  switch (m_addressSpace) {
    case WebAddressSpacePublic:
      return "public";

    case WebAddressSpacePrivate:
      return "private";

    case WebAddressSpaceLocal:
      return "local";
  }
  NOTREACHED();
  return "public";
}
开发者ID:mirror,项目名称:chromium,代码行数:14,代码来源:SecurityContext.cpp


示例15: NOTREACHED

IClusterSPtr ServersManager::createCluster(IClusterSettingsBaseSPtr settings) {
  if (!settings) {
    NOTREACHED();
    return IClusterSPtr();
  }

  connectionTypes conT = settings->type();
#ifdef BUILD_WITH_REDIS
  if (conT == REDIS) {
    IClusterSPtr cl(new redis::RedisCluster(settings->name()));
    IClusterSettingsBase::cluster_connection_type nodes = settings->nodes();
    for (size_t i = 0; i < nodes.size(); ++i) {
      IConnectionSettingsBaseSPtr nd = nodes[i];
      IServerSPtr serv = createServer(nd);
      cl->addServer(serv);
    }
    return cl;
  }
#endif

  NOTREACHED();
  return IClusterSPtr();
}
开发者ID:kunyuqiushuang,项目名称:fastonosql,代码行数:23,代码来源:servers_manager.cpp


示例16: CR_DEFINE_STATIC_LOCAL

TestPlugin::Primitive TestPlugin::parsePrimitive(const WebString& string)
{
    const CR_DEFINE_STATIC_LOCAL(WebString, kPrimitiveNone, ("none"));
    const CR_DEFINE_STATIC_LOCAL(WebString, kPrimitiveTriangle, ("triangle"));

    Primitive primitive = PrimitiveNone;
    if (string == kPrimitiveNone)
        primitive = PrimitiveNone;
    else if (string == kPrimitiveTriangle)
        primitive = PrimitiveTriangle;
    else
        NOTREACHED();
    return primitive;
}
开发者ID:Yoko2012,项目名称:webrtc,代码行数:14,代码来源:TestPlugin.cpp


示例17: switch

 bool NativeTextfieldWin::IsCommandIdEnabled(int command_id) const
 {
     switch(command_id)
     {
     case IDS_APP_UNDO:       return !textfield_->read_only() && !!CanUndo();
     case IDS_APP_CUT:        return !textfield_->read_only() &&
                                  !textfield_->IsPassword() && !!CanCut();
     case IDS_APP_COPY:       return !!CanCopy() && !textfield_->IsPassword();
     case IDS_APP_PASTE:      return !textfield_->read_only() && !!CanPaste();
     case IDS_APP_SELECT_ALL: return !!CanSelectAll();
     default:                 NOTREACHED();
         return false;
     }
 }
开发者ID:abyvaltsev,项目名称:putty-nd3.x,代码行数:14,代码来源:native_textfield_win.cpp


示例18: toFilterNonInterpolableValue

FilterOperation* FilterInterpolationFunctions::createFilter(
    const InterpolableValue& interpolableValue,
    const NonInterpolableValue& untypedNonInterpolableValue,
    const StyleResolverState& state) {
  const FilterNonInterpolableValue& nonInterpolableValue =
      toFilterNonInterpolableValue(untypedNonInterpolableValue);
  FilterOperation::OperationType type = nonInterpolableValue.type();

  switch (type) {
    case FilterOperation::GRAYSCALE:
    case FilterOperation::HUE_ROTATE:
    case FilterOperation::SATURATE:
    case FilterOperation::SEPIA: {
      double value =
          clampParameter(toInterpolableNumber(interpolableValue).value(), type);
      return BasicColorMatrixFilterOperation::create(value, type);
    }

    case FilterOperation::BRIGHTNESS:
    case FilterOperation::CONTRAST:
    case FilterOperation::INVERT:
    case FilterOperation::OPACITY: {
      double value =
          clampParameter(toInterpolableNumber(interpolableValue).value(), type);
      return BasicComponentTransferFilterOperation::create(value, type);
    }

    case FilterOperation::BLUR: {
      Length stdDeviation = LengthInterpolationFunctions::createLength(
          interpolableValue, nonInterpolableValue.typeNonInterpolableValue(),
          state.cssToLengthConversionData(), ValueRangeNonNegative);
      return BlurFilterOperation::create(stdDeviation);
    }

    case FilterOperation::DROP_SHADOW: {
      ShadowData shadowData = ShadowInterpolationFunctions::createShadowData(
          interpolableValue, nonInterpolableValue.typeNonInterpolableValue(),
          state);
      Color color = shadowData.color().isCurrentColor()
                        ? Color::black
                        : shadowData.color().getColor();
      return DropShadowFilterOperation::create(
          IntPoint(shadowData.x(), shadowData.y()), shadowData.blur(), color);
    }

    default:
      NOTREACHED();
      return nullptr;
  }
}
开发者ID:mirror,项目名称:chromium,代码行数:50,代码来源:FilterInterpolationFunctions.cpp


示例19: DCHECK_EQ

    void FieldTrial::UseOneTimeRandomization()
    {
        DCHECK_EQ(group_, kNotFinalized);
        DCHECK_EQ(kDefaultGroupNumber + 1, next_group_number_);
        if(!FieldTrialList::IsOneTimeRandomizationEnabled())
        {
            NOTREACHED();
            Disable();
            return;
        }

        random_ = static_cast<Probability>(
            divisor_ * HashClientId(FieldTrialList::client_id(), name_));
    }
开发者ID:kanego,项目名称:CoreProject,代码行数:14,代码来源:field_trial.cpp


示例20: switch

String MediaDeviceInfo::kind() const
{
    switch (m_webMediaDeviceInfo.kind()) {
    case WebMediaDeviceInfo::MediaDeviceKindAudioInput:
        return "audioinput";
    case WebMediaDeviceInfo::MediaDeviceKindAudioOutput:
        return "audiooutput";
    case WebMediaDeviceInfo::MediaDeviceKindVideoInput:
        return "videoinput";
    }

    NOTREACHED();
    return String();
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:14,代码来源:MediaDeviceInfo.cpp



注:本文中的NOTREACHED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NOT_END函数代码示例发布时间:2022-05-30
下一篇:
C++ NOTIFY_SETUP函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap