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

C++ Make函数代码示例

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

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



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

示例1: modes

sk_sp<SkFlattenable> SkMergeImageFilter::CreateProc(SkReadBuffer& buffer) {
    Common common;
    if (!common.unflatten(buffer, -1)) {
        return nullptr;
    }

    const int count = common.inputCount();
    bool hasModes = buffer.readBool();
    if (hasModes) {
        SkAutoSTArray<4, SkXfermode::Mode> modes(count);
        SkAutoSTArray<4, uint8_t> modes8(count);
        if (!buffer.readByteArray(modes8.get(), count)) {
            return nullptr;
        }
        for (int i = 0; i < count; ++i) {
            modes[i] = (SkXfermode::Mode)modes8[i];
            buffer.validate(SkIsValidMode(modes[i]));
        }
        if (!buffer.isValid()) {
            return nullptr;
        }
        return Make(common.inputs(), count, modes.get(), &common.cropRect());
    }
    return Make(common.inputs(), count, nullptr, &common.cropRect());
}
开发者ID:alphan102,项目名称:gecko-dev,代码行数:25,代码来源:SkMergeImageFilter.cpp


示例2: main

int main()
{
    Make('i', 'i');
    Make('i', 'u');
    Make('u', 'i');
    Make('i', 'i');
}
开发者ID:CCJY,项目名称:coliru,代码行数:7,代码来源:main.cpp


示例3: TakeIt

TokenPtr SLScanner::ScanMinusOp()
{
    std::string spell;
    spell += TakeIt();

    if (Is('-'))
        return Make(Tokens::UnaryOp, spell, true);
    else if (Is('='))
        return Make(Tokens::AssignOp, spell, true);

    return Make(Tokens::BinaryOp, spell);
}
开发者ID:LukasBanana,项目名称:HLSLTranslator,代码行数:12,代码来源:SLScanner.cpp


示例4: Make

void Make(int p,int u,int v,int c){
	if (u==v) return;
	if (level[u]>level[v]){
		int k=g[father[u]][u];
		w[k][p]=max(w[k][p],cost[k]-c);
		Make(p,father[u],v,c);
	}else{
		int k=g[father[v]][v];
		w[k][p]=max(w[k][p],cost[k]-c);
		Make(p,u,father[v],c);
	}
}
开发者ID:TRYang,项目名称:acm,代码行数:12,代码来源:sgu_206.cpp


示例5: Make

void Make(long l, long r, Set& s) {
    if (l == r) {
        long t = s.Value();
        if (t > best)
            ID = l, best = t;
        return;
    }
    Set L, R;
    long mid = (l + r) >> 1;
    Add(s, L, l, mid);
    Add(s, R, mid + 1, r);
    Make(l, mid, R);
    Make(mid + 1, r, L);
}
开发者ID:qscqesze,项目名称:acm-icpc,代码行数:14,代码来源:1961.cpp


示例6: MainLineIterate

static void MainLineIterate(typePos *Position)
    {
    int va, v2, cp;
    uint32 m;
    (Position->Dyn + 1)->move = MoveNone;
    Mobility(Position);
    if (!RobboTotalBaseScore(Position, &va))
        {
        if (VerboseRobboBases)
			{
			Send("info string Failure in MainLine\n");

#ifdef Log
			if (WriteLog)
				{
				log_file = fopen(log_filename, "a");
				fprintf(log_file, "info string Failure in MainLine\n");
				close_log();
				}
#endif
			}

        (Position->Dyn + 1)->move = MoveNone;
       Position->StackHeight = 0;
        return;
        }
    if (!RobboMove(Position, &m, &v2, &cp))
        {
        (Position->Dyn + 1)->move = MoveNone;
       Position->StackHeight = 0;
        return;
        }
    if (va == dDraw)
        {
       Position->StackHeight = 0;
        Make(Position, m);
       Position->StackHeight = 1;
        Undo(Position, m);
        return;
        }
    m &= 0x7fff;
   Position->StackHeight = 0;
    Make(Position, m);
   Position->StackHeight = 1;
    MainLineIterate(Position);
    Undo(Position, m);
   Position->StackHeight = 1;
    }
开发者ID:Censor,项目名称:Firenzina,代码行数:48,代码来源:robbo_glue.c


示例7: Make

ArrayData* ProxyArray::SetInt(ArrayData* ad, int64_t k,
                                         const Variant& v, bool copy) {
  ad = copy ? Make(innerArr(ad)) : ad;
  auto r = innerArr(ad)->set(k, v, innerArr(ad)->hasMultipleRefs());
  assert(!copy);
  return reseatable(ad, r);
}
开发者ID:aripringle,项目名称:hhvm,代码行数:7,代码来源:proxy-array.cpp


示例8: MakeForLocalSpace

sk_sp<SkFlattenable> SkPictureImageFilter::CreateProc(SkReadBuffer& buffer) {
    sk_sp<SkPicture> picture;
    SkRect cropRect;

    if (buffer.isCrossProcess() && SkPicture::PictureIOSecurityPrecautionsEnabled()) {
        buffer.validate(!buffer.readBool());
    } else {
        if (buffer.readBool()) {
            picture = SkPicture::MakeFromBuffer(buffer);
        }
    }
    buffer.readRect(&cropRect);
    PictureResolution pictureResolution;
    if (buffer.isVersionLT(SkReadBuffer::kPictureImageFilterResolution_Version)) {
        pictureResolution = kDeviceSpace_PictureResolution;
    } else {
        pictureResolution = (PictureResolution)buffer.readInt();
    }

    if (kLocalSpace_PictureResolution == pictureResolution) {
        //filterLevel is only serialized if pictureResolution is LocalSpace
        SkFilterQuality filterQuality;
        if (buffer.isVersionLT(SkReadBuffer::kPictureImageFilterLevel_Version)) {
            filterQuality = kLow_SkFilterQuality;
        } else {
            filterQuality = (SkFilterQuality)buffer.readInt();
        }
        return MakeForLocalSpace(picture, cropRect, filterQuality);
    }
    return Make(picture, cropRect);
}
开发者ID:hxsong-GitHub,项目名称:skia,代码行数:31,代码来源:SkPictureImageFilter.cpp


示例9: SK_IMAGEFILTER_UNFLATTEN_COMMON

sk_sp<SkFlattenable> SkMatrixConvolutionImageFilter::CreateProc(SkReadBuffer& buffer) {
    SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
    SkISize kernelSize;
    kernelSize.fWidth = buffer.readInt();
    kernelSize.fHeight = buffer.readInt();
    const int count = buffer.getArrayCount();

    const int64_t kernelArea = sk_64_mul(kernelSize.width(), kernelSize.height());
    if (!buffer.validate(kernelArea == count)) {
        return nullptr;
    }
    SkAutoSTArray<16, SkScalar> kernel(count);
    if (!buffer.readScalarArray(kernel.get(), count)) {
        return nullptr;
    }
    SkScalar gain = buffer.readScalar();
    SkScalar bias = buffer.readScalar();
    SkIPoint kernelOffset;
    kernelOffset.fX = buffer.readInt();
    kernelOffset.fY = buffer.readInt();
    TileMode tileMode = (TileMode)buffer.readInt();
    bool convolveAlpha = buffer.readBool();
    return Make(kernelSize, kernel.get(), gain, bias, kernelOffset, tileMode,
                convolveAlpha, common.getInput(0), &common.cropRect());
}
开发者ID:alphan102,项目名称:gecko-dev,代码行数:25,代码来源:SkMatrixConvolutionImageFilter.cpp


示例10: Make

sk_sp<SkFlattenable> SkToSRGBColorFilter::CreateProc(SkReadBuffer& buffer) {
    auto data = buffer.readByteArrayAsData();
    if (data) {
        return Make(SkColorSpace::Deserialize(data->data(), data->size()));
    }
    return nullptr;
}
开发者ID:molikto,项目名称:Skia,代码行数:7,代码来源:SkToSRGBColorFilter.cpp


示例11: Make

sk_sp<SkFont> SkFont::Testing_CreateFromPaint(const SkPaint& paint) {
    uint32_t flags = 0;
    if (paint.isVerticalText()) {
        flags |= kVertical_Flag;
    }
    if (paint.isEmbeddedBitmapText()) {
        flags |= kEmbeddedBitmaps_Flag;
    }
    if (paint.getFlags() & SkPaint::kGenA8FromLCD_Flag) {
        flags |= kGenA8FromLCD_Flag;
    }
    if (paint.isFakeBoldText()) {
        flags |= kEmbolden_Flag;
    }

    if (SkPaint::kFull_Hinting == paint.getHinting()) {
        flags |= kEnableByteCodeHints_Flag;
    }
    if (paint.isAutohinted()) {
        flags |= kEnableAutoHints_Flag;
    }
    if (paint.isSubpixelText() || paint.isLinearText()) {
        // this is our default
    } else {
        flags |= kUseNonlinearMetrics_Flag;
    }

    MaskType maskType = SkFont::kBW_MaskType;
    if (paint.isAntiAlias()) {
        maskType = paint.isLCDRenderText() ? kLCD_MaskType : kA8_MaskType;
    }

    return Make(sk_ref_sp(paint.getTypeface()), paint.getTextSize(), paint.getTextScaleX(),
                paint.getTextSkewX(), maskType, flags);
}
开发者ID:C-Tillion,项目名称:skia,代码行数:35,代码来源:SkFont.cpp


示例12: switch

int cPath::NextStep(int *px,int *py,int *cx,int *cy)
{
	int move=CONTINUE;

	switch(dir)
	{
		case D_N:	(*py)-=STEP_LENGTH;						break;
		case D_S:	(*py)+=STEP_LENGTH;						break;
		case D_E:	(*px)+=STEP_LENGTH;						break;
		case D_O:	(*px)-=STEP_LENGTH;						break;
		case D_NE:(*py)-=STEP_LENGTH; (*px)+=STEP_LENGTH; break;
		case D_NO:(*py)-=STEP_LENGTH; (*px)-=STEP_LENGTH; break;
		case D_SE:(*py)+=STEP_LENGTH; (*px)+=STEP_LENGTH; break;
		case D_SO:(*py)+=STEP_LENGTH; (*px)-=STEP_LENGTH; break;
	}

	//Calculate next cell
	if( (((*px)%32)==0) && (((*py)%32)==0))
	{
		x = (*px)>>5; *cx = x;
		y = (*py)>>5; *cy = y;

		if((nxf==-1) && (nyf==-1))
		{
			move=NextCell();
		}
		else//if((nxf>=0) || (nyf>=0))
		{
			AStar->EndPathfinder();
			delete AStar;
			AStar = NULL;
			Make(world,*cx,*cy,nxf,nyf);
			//move=CONTINUE;
		}
	}
开发者ID:marcelgozalbo,项目名称:MVJ2D,代码行数:35,代码来源:cPath.cpp


示例13: rde_ot_intern2

long int
rde_ot_intern2 (RDE_STATE p,
		const char* operator,
		Tcl_Obj* detail1,
		Tcl_Obj* detail2)
{
    long int id;
    Tcl_DString buf;

    TRACE (("rde_ot_intern2 (%p, '%s' %p = '%s', %p = '%s')", p, operator,
	    detail1, Tcl_GetString(detail1)
	    detail2, Tcl_GetString(detail2)));
    if (IsCached (p, detail1, &id)) {
	return id;
    }

    TRACE (("INTERNALIZE"));

    /* Create a list of operator + detail1 + detail2.
     * Using a DString.
     */

    Tcl_DStringInit (&buf);
    Tcl_DStringAppendElement (&buf, operator);
    Tcl_DStringAppendElement (&buf, Tcl_GetString (detail1));
    Tcl_DStringAppendElement (&buf, Tcl_GetString (detail2));

    id = Make (p, detail1, Tcl_DStringValue (&buf));

    Tcl_DStringFree (&buf);
    return id;
}
开发者ID:EchoOfSoul,项目名称:tcllib,代码行数:32,代码来源:ot.c


示例14: ASSERT_VALID

void CUniformResourceLocator::Copy( const CUniversalNamingConvention& source )
{
   ASSERT_VALID( this );

   Empty();

   ProtocolName = "file";
   MachineName  = source.ServerName;
   PathName     = source.ShareName;
   PathName    += "/";
   PathName    += source.PathName;

   /*
   ** Now go through PathName to make sure it has /'s instead of \'s
   */

   int location_of_slash = 0;

   while( location_of_slash < PathName.GetLength() )
   {
      if ( PathName[ location_of_slash ] == '\\' )
      {
         PathName.SetAt( location_of_slash, '/' );
      }

      location_of_slash++;
   }

   Make();
}
开发者ID:DimeSPb,项目名称:ecuExplorer,代码行数:30,代码来源:CURL.CPP


示例15: PERFD

uint64 PERFD (typePOS* POSITION, int n)
{
  int i;
  uint64 TOTAL = 0, TIME;
  typeMoveList LM[256], *lm;
  DrawBoard (POSITION);
  TIME = GetClock();
  Mobility (POSITION);
  if (IN_CHECK)
    lm = EvasionMoves (POSITION, LM, 0xffffffffffffffff);
  else
    {
      lm = CaptureMoves (POSITION, LM, POSITION->OccupiedBW);
      lm = OrdinaryMoves (POSITION, lm);
    }
  for (i = 0; i < lm - LM; i++)
    {
      Make (POSITION, LM[i].move);
      Mobility (POSITION);
      if (!ILLEGAL)
	{
	  printf ("%s ",Notate (LM[i].move, STRING1[POSITION->cpu]));
	  PERFT (POSITION, n - 1);
	  TOTAL += CNT[n - 1];
	}
      Undo (POSITION, LM[i].move);
    }
  printf ("TOTAL %lld  moves %ld  time: %lld us\n",
	  TOTAL, lm - LM, GetClock() - TIME);
  return TOTAL;
}
开发者ID:Censor,项目名称:Ivanhoe,代码行数:31,代码来源:perft.c


示例16: Error

TokenPtr Scanner::ScanNumber()
{
    if (!std::isdigit(UChr()))
        Error("expected digit");
    
    /* Take first number (literals like ".0" are not allowed) */
    std::string spell;

    const auto startChr = TakeIt();
    spell += startChr;

    /* Parse integer or floating-point number */
    auto type = Token::Types::IntLiteral;

    ScanDecimalLiteral(spell);

    if (Is('.'))
    {
        spell += TakeIt();
        
        if (std::isdigit(UChr()))
            ScanDecimalLiteral(spell);
        else
            Error("floating-point literals must have a decimal on both sides of the dot (e.g. '0.0' but not '0.' or '.0')");

        type = Token::Types::FloatLiteral;
    }

    if (std::isalpha(UChr()) || Is('.'))
        ErrorLetterInNumber();

    /* Create number token */
    return Make(type, spell);
}
开发者ID:LukasBanana,项目名称:Abacus,代码行数:34,代码来源:Scanner.cpp


示例17: wxT

int FbImportZip::Save(bool progress)
{
	m_id = m_database.Int(m_filename, wxT("SELECT id FROM archives WHERE file_name=?"));

	wxString sql = m_id ?
		wxT("UPDATE archives SET file_name=?,file_path=?,file_size=?,file_count=? WHERE id=?") :
		wxT("INSERT INTO archives(file_name,file_path,file_size,file_count,id) VALUES (?,?,?,?,?)") ;

	if (!m_id) m_id = - m_database.NewId(DB_NEW_ARCHIVE);

	{
		wxLongLong count = m_zip.GetTotalEntries();
		FbSQLite3Statement stmt = m_database.PrepareStatement(sql);
		stmt.Bind(1, m_filename);
		stmt.Bind(2, m_filepath);
		stmt.Bind(3, (wxLongLong)m_filesize);
		stmt.Bind(4, count);
		stmt.Bind(5, m_id);
		stmt.ExecuteUpdate();
	}

	Make(progress);

	return m_id;
}
开发者ID:EvgeniiFrolov,项目名称:myrulib,代码行数:25,代码来源:FbImportReader.cpp


示例18: main

int main(){
	int i,j,k;
	scanf("%d %d",&n,&m);
	memset(g,0,sizeof(g));
	memset(deg,0,sizeof(deg));
	for (i=0;i<n*m>>1;i++){
		scanf("%d %d",&j,&k);
		g[j][k]=g[k][j]=1;
		b[j][k]=b[k][j]=i+1;
		deg[j]++;
		deg[k]++;
	}
	memset(a,0,sizeof(a));
	Make();
	memset(from,-1,sizeof(from));
	k=0;
	for (i=1;i<=n;i++){
		memset(tag,0,sizeof(tag));
		if (dfs(i)) k++;
	}
	if (k<n) printf("NO\n");else{
		printf("YES\n");
		for (i=1;i<=n;i++) printf("%d\n",b[from[i]][i]);
	}
	return 0;
}
开发者ID:TRYang,项目名称:acm,代码行数:26,代码来源:sgu_286.cpp


示例19: Make

ArrayData*
ProxyArray::PlusEq(ArrayData* ad, const ArrayData* elems) {
  auto const ret = ad->hasMultipleRefs() ? Make(innerArr(ad))
                                         : asProxyArray(ad);
  auto r = ret->m_ad->plusEq(elems);
  return reseatable(ad, r);
}
开发者ID:BwRy,项目名称:hhvm,代码行数:7,代码来源:proxy-array.cpp


示例20: throw_string_too_large

StringData* StringData::Make(const char* data, size_t len, CopyStringMode) {
  if (UNLIKELY(len > StringData::MaxSize)) {
    throw_string_too_large(len);
  }

  return Make(StringSlice(data, len), CopyString);
}
开发者ID:huamichaelchen,项目名称:hhvm,代码行数:7,代码来源:string-data.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ MakeActivityException函数代码示例发布时间:2022-05-30
下一篇:
C++ Maj函数代码示例发布时间: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