当前位置: 首页>>代码示例>>C++>>正文


C++ UNUSED_ALWAYS函数代码示例

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


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

示例1: UNUSED_ALWAYS

///////////////////////////////////////////////////////////////////////////////
// OnTimer
void XComboList::OnTimer(UINT nIDEvent) 
{
	UNUSED_ALWAYS(nIDEvent);

	if (!::IsWindow(m_ListBox.m_hWnd))
		return;

	// get current mouse position
	POINT point;
	::GetCursorPos(&point);
	ScreenToClient(&point);

	BOOL bOutside;
	int nIndex = m_ListBox.ItemFromPoint(point, bOutside);
	//TRACE("   nIndex=%d  bOutside=%d\n", nIndex, bOutside);

	if (!bOutside)
	{
		int nCurSel = m_ListBox.GetCurSel();

		if (nIndex != nCurSel)
			if (nIndex >= 0 && nIndex < m_ListBox.GetCount())
				m_ListBox.SetCurSel(nIndex);
	}
}
开发者ID:hnordquist,项目名称:FDMS,代码行数:27,代码来源:XComboList.cpp

示例2: SetupDefaultCaps

static void SetupDefaultCaps(AM_MEDIA_TYPE* pmt, VIDEO_STREAM_CONFIG_CAPS& caps)
{
	memset(&caps, 0, sizeof(caps));

	if (!pmt) {
		return;
	}

	VIDEOINFOHEADER* vih = (VIDEOINFOHEADER*)pmt->pbFormat;
	UNUSED_ALWAYS(vih);

	BITMAPINFOHEADER* bih = (pmt->formattype == FORMAT_VideoInfo)
							? &((VIDEOINFOHEADER*)pmt->pbFormat)->bmiHeader
							: (pmt->formattype == FORMAT_VideoInfo2)
							? &((VIDEOINFOHEADER2*)pmt->pbFormat)->bmiHeader
							: NULL;

	caps.guid = GUID_NULL;
	caps.VideoStandard = 0;
	caps.InputSize.cx = bih->biWidth;
	caps.InputSize.cy = abs(bih->biHeight);
	caps.MinCroppingSize = caps.MaxCroppingSize = caps.InputSize;
	caps.CropGranularityX = caps.CropGranularityY = 1;
	caps.CropAlignX = caps.CropAlignY = 1;
	caps.MinOutputSize = CSize(64, 64);
	caps.MaxOutputSize = CSize(768, 576);
	caps.OutputGranularityX = 16;
	caps.OutputGranularityY = 1;
	caps.StretchTapsX = caps.StretchTapsY = 0;
	caps.ShrinkTapsX = caps.ShrinkTapsY = 0;
	caps.MinFrameInterval = 100000i64;
	caps.MaxFrameInterval = 100000000i64;
	caps.MinBitsPerSecond = caps.MaxBitsPerSecond = 0;
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:34,代码来源:PlayerCaptureDialog.cpp

示例3: be2me_16

void CIfo::RemovePgciUOPs (uint8_t *ptr)
{
	ifo_hdr_t*	hdr = (ifo_hdr_t *) ptr;
	uint16_t	num;
	int			i;

	ptr += IFO_HDR_LEN;
	num  = be2me_16(hdr->num);

	for (i=1; i<=num; i++)
	{
		lu_sub_t *lu_sub = (lu_sub_t *) ptr;
		UNUSED_ALWAYS(lu_sub);

		ptr += LU_SUB_LEN;
	}

	for (i=0; i<be2me_16(hdr->num); i++)
	{
		uint8_t *ptr;

		if (GetMiscPGCI (hdr, i, &ptr) >= 0)
		{
			pgc_t*		pgc = (pgc_t*) ptr;
			pgc->prohibited_ops = 0;
		}
	}
}
开发者ID:Fluffiest,项目名称:mpc-hc,代码行数:28,代码来源:Ifo.cpp

示例4: switch

ItemIntegerType CCellView::GetCellValue() const
{
  // If the item is being edited in-cell, we'll get the data from the control
  ItemIntegerType rc=0;
  switch(TI(m_hInCell).Type()){
		case CConfigItem::Integer:
      {
        CString strData;
        m_pwndCell->GetWindowText(strData);
        if(!CUtils::StrToItemIntegerType(strData,rc)){
          rc=0;
        }
      }
      break;
    case CConfigItem::Enum:
    /*
    case CConfigItem::Boolean:
    case CConfigItem::Radio:
    //rc=((CTreeComboBox *)m_pwndCell)->GetCurSel();
    rc=((CComboEdit *)m_pwndCell)->GetCurSel();
    break;
      */
    case CConfigItem::String:
    default:
      int type=TI(m_hInCell).Type();
      UNUSED_ALWAYS(type);
      ASSERT(FALSE);
      break;
  }
  return rc;
}
开发者ID:Robertysc,项目名称:ecos,代码行数:31,代码来源:CellView.cpp

示例5: sizeof

/**
 Processes a file, if it contains valuable commands. The file is loaded into a buffer
 a is passed to <it>ParseBuffer</it>, where all commands will be extracted.
 */
void CStyleFile::ProcessFile()
{
	CFile f;

	try
	{
		f.Open(m_Filename, CFile::modeRead);
		ULONGLONG l = f.GetLength();

		CString text;
		f.Read(text.GetBuffer(l), l * sizeof(TCHAR));
		text.ReleaseBuffer();

		if (HasCommands(text))
		{
			ParseBuffer(text);
		}
	}
	catch (CFileException& ex)
	{
		TRACE(_T("Error opening style file: %s\n"), ex);
		UNUSED_ALWAYS(ex);

		f.Close();
	}

	f.Close();
}
开发者ID:bzindovic,项目名称:texniccenter-code,代码行数:32,代码来源:StyleFile.cpp

示例6: switch

///////////////////////////////////////////////////////////////////////////////
// ReportError
void CXHyperLink::ReportError(int nError)
{
#ifdef XHYPERLINK_REPORT_ERROR

	CString str;
	switch (nError) 
	{
		case 0:							str = "The operating system is out\nof memory or resources."; break;
		case SE_ERR_PNF:				str = "The specified path was not found."; break;
		case SE_ERR_FNF:				str = "The specified file was not found."; break;
		case ERROR_BAD_FORMAT:			str = "The .EXE file is invalid\n(non-Win32 .EXE or error in .EXE image)."; break;
		case SE_ERR_ACCESSDENIED:		str = "The operating system denied\naccess to the specified file."; break;
		case SE_ERR_ASSOCINCOMPLETE:	str = "The filename association is\nincomplete or invalid."; break;
		case SE_ERR_DDEBUSY:			str = "The DDE transaction could not\nbe completed because other DDE transactions\nwere being processed."; break;
		case SE_ERR_DDEFAIL:			str = "The DDE transaction failed."; break;
		case SE_ERR_DDETIMEOUT:			str = "The DDE transaction could not\nbe completed because the request timed out."; break;
		case SE_ERR_DLLNOTFOUND:		str = "The specified dynamic-link library was not found."; break;
		case SE_ERR_NOASSOC:			str = "There is no application associated\nwith the given filename extension."; break;
		case SE_ERR_OOM:				str = "There was not enough memory to complete the operation."; break;
		case SE_ERR_SHARE:				str = "A sharing violation occurred. ";
		default:						str.Format(_T("Unknown Error (%d) occurred."), nError); break;
	}
	str = "Unable to open hyperlink:\n\n" + str;
	AfxMessageBox(str, MB_ICONEXCLAMATION | MB_OK);

#else

	UNUSED_ALWAYS(nError);

#endif	// XHYPERLINK_REPORT_ERROR
}
开发者ID:HiXiaoMing,项目名称:Win_Dev_Driver_Code,代码行数:33,代码来源:XHyperLink.cpp

示例7: RawDllMain

BOOL WINAPI RawDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)
{
	UNUSED_ALWAYS(hInstance);
	if (dwReason == DLL_PROCESS_ATTACH)
	{
		// Prevent the MFC DLL from being unloaded prematurely
		LoadLibraryA(MFC42_DLL);

		// make sure we have enough memory to attempt to start (8kb)
		void* pMinHeap = LocalAlloc(NONZEROLPTR, 0x2000);
		if (pMinHeap == NULL)
			return FALSE;   // fail if memory alloc fails
		LocalFree(pMinHeap);

		// save critical data pointers before running the constructors
		AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
		pModuleState->m_pClassInit = pModuleState->m_classList;
		pModuleState->m_pFactoryInit = pModuleState->m_factoryList;
		pModuleState->m_classList.m_pHead = NULL;
		pModuleState->m_factoryList.m_pHead = NULL;
	}
	else if (dwReason == DLL_PROCESS_DETACH)
	{
		// Now it's OK for the MFC  DLL to be unloaded (see LoadLibrary above)
		FreeLibrary(GetModuleHandleA(MFC42_DLL));
	}
	return TRUE;    // ok
}
开发者ID:VectorDM,项目名称:VC98,代码行数:28,代码来源:DLLNET.CPP

示例8: UNUSED_ALWAYS

void CHdmvSub::ParseObject(CGolombBuffer* pGBuffer, USHORT nUnitSize)	// #498
{
	SHORT	object_id	= pGBuffer->ReadShort();
	UNUSED_ALWAYS(object_id);
	BYTE	m_sequence_desc;

	ASSERT (m_pCurrentObject != NULL);
	if (m_pCurrentObject) { // && m_pCurrentObject->m_object_id_ref == object_id)
		m_pCurrentObject->m_version_number	= pGBuffer->ReadByte();
		m_sequence_desc						= pGBuffer->ReadByte();

		if (m_sequence_desc & 0x80) {
			DWORD	object_data_length  = (DWORD)pGBuffer->BitRead(24);

			m_pCurrentObject->m_width			= pGBuffer->ReadShort();
			m_pCurrentObject->m_height 			= pGBuffer->ReadShort();

			m_pCurrentObject->SetRLEData (pGBuffer->GetBufferPos(), nUnitSize-11, object_data_length-4);

			TRACE_HDMVSUB ("CHdmvSub:NewObject	size=%ld, total obj=%d, %dx%d\n", object_data_length, m_pObjects.GetCount(),
						   m_pCurrentObject->m_width, m_pCurrentObject->m_height);
		} else {
			m_pCurrentObject->AppendRLEData (pGBuffer->GetBufferPos(), nUnitSize-4);
		}
	}
}
开发者ID:Samangan,项目名称:mpc-hc,代码行数:26,代码来源:HdmvSub.cpp

示例9: UNUSED_ALWAYS

CString CSDMdlMachBendRadiusCheck::CheckResultDesc(int nResult, const CheckData &checkData) 
{ 
	UNUSED_ALWAYS(checkData);
	CString strResultDesc = L"";

	switch(nResult)
	{
	case CHECK_RESULT_NO_ERROR: 
		strResultDesc = L"折弯半径与板厚的比值符合要求";
		break;
	case CHECK_RESULT_INVALID_INPUT:
		strResultDesc = L"输入值不合理";
		break;
	case CHECK_RESULT_INVALID_VALUE:
		strResultDesc = L"折弯半径与板厚比值不符合要求";
		break;
	case CHECK_RESULT_INVALID_MODEL:
		strResultDesc = L"模型非钣金件";
		break;
	default:
		break;
	}

	return strResultDesc;
}
开发者ID:bjliugq,项目名称:SmartDoctor,代码行数:25,代码来源:SDMdlMachBendRadiusCheck.cpp

示例10: UNUSED_ALWAYS

BOOL CFileFind::FindFile(LPCTSTR pstrName /* = NULL */,
	DWORD dwUnused /* = 0 */)
{
	UNUSED_ALWAYS(dwUnused);
	Close();
	m_pNextInfo = new WIN32_FIND_DATA;
	m_bGotLast = FALSE;

	if (pstrName == NULL)
		pstrName = _T("*.*");
	lstrcpy(((WIN32_FIND_DATA*) m_pNextInfo)->cFileName, pstrName);

	m_hContext = ::FindFirstFile(pstrName, (WIN32_FIND_DATA*) m_pNextInfo);

	if (m_hContext == INVALID_HANDLE_VALUE)
	{
		DWORD dwTemp = ::GetLastError();
		Close();
		::SetLastError(dwTemp);
		return FALSE;
	}

	LPTSTR pstrRoot = m_strRoot.GetBufferSetLength(_MAX_PATH);
	LPCTSTR pstr = _tfullpath(pstrRoot, pstrName, _MAX_PATH);

	// passed name isn't a valid path but was found by the API
	ASSERT(pstr != NULL);
	if (pstr == NULL)
	{
		m_strRoot.ReleaseBuffer(-1);
		Close();
		::SetLastError(ERROR_INVALID_NAME);
		return FALSE;
	}
	else
	{
		// find the last forward or backward whack
		LPTSTR pstrBack  = _tcsrchr(pstrRoot, '\\');
		LPTSTR pstrFront = _tcsrchr(pstrRoot, '/');

		if (pstrFront != NULL || pstrBack != NULL)
		{
			if (pstrFront == NULL)
				pstrFront = pstrRoot;
			if (pstrBack == NULL)
				pstrBack = pstrRoot;

			// from the start to the last whack is the root

			if (pstrFront >= pstrBack)
				*pstrFront = '\0';
			else
				*pstrBack = '\0';
		}
		m_strRoot.ReleaseBuffer(-1);
	}

	return TRUE;
}
开发者ID:Rupan,项目名称:winscp,代码行数:59,代码来源:filefind.cpp

示例11: UNUSED_ALWAYS

void CEditView::OnPrepareDC( CDC *pDC, CPrintInfo *pInfo )
/********************************************************/
{
    UNUSED_ALWAYS( pDC );
    if( pInfo != NULL && pInfo->m_nCurPage > m_aPageStart.GetCount() ) {
        pInfo->m_bContinuePrinting = FALSE;
    }
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:8,代码来源:editview.cpp

示例12: UNUSED_ALWAYS

BOOL CFlickerFreeTree::OnEraseBkgnd(CDC* pDC)
{
    // TODO: Add your message handler code here and/or call default
    UNUSED_ALWAYS(pDC);

    //return CTreeCtrl::OnEraseBkgnd(pDC);
    return TRUE;
}
开发者ID:Conti-Meissner,项目名称:busmaster,代码行数:8,代码来源:FlickerFreeTree.cpp

示例13: UNUSED_ALWAYS

LRESULT CRunTestsSheet::OnTestOutput(WPARAM wParam, LPARAM lParam)
{
  UNUSED_ALWAYS(lParam);
  LPTSTR psz=(LPTSTR)wParam;
  outputpage.AddText(psz);
  delete [] psz;
  return 0;
}
开发者ID:Robertysc,项目名称:ecos,代码行数:8,代码来源:RunTestsSheet.cpp

示例14: UNUSED_ALWAYS

void CHtmlView::OnNewWindow2(LPDISPATCH* ppDisp, BOOL* bCancel)
{
	// default to continuing
	bCancel = FALSE;

	// user will override to handle this notification
	UNUSED_ALWAYS(ppDisp);
}
开发者ID:Rupan,项目名称:winscp,代码行数:8,代码来源:viewhtml.cpp

示例15: UNUSED_ALWAYS

bool
PropPageGeneral::OnProgress (/*[in]*/ unsigned			level,
			     /*[in]*/ const char *	lpszDirectory)
{
  UNUSED_ALWAYS (level);
  pProgressDialog->SetLine (2, lpszDirectory);
  return (! pProgressDialog->HasUserCancelled());
}
开发者ID:bngabonziza,项目名称:miktex,代码行数:8,代码来源:PropPageGeneral.cpp


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