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

C++ ARX_UNUSED函数代码示例

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

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



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

示例1: ARX_UNUSED

void OpenGLRenderer::beforeResize(bool wasOrIsFullscreen) {
	
#if ARX_PLATFORM == ARX_PLATFORM_LINUX || ARX_PLATFORM == ARX_PLATFORM_BSD
	// No re-initialization needed
	ARX_UNUSED(wasOrIsFullscreen);
#else
	
	if(!isInitialized()) {
		return;
	}
	
	#if ARX_PLATFORM == ARX_PLATFORM_WIN32
	if(!wasOrIsFullscreen) {
		return;
	}
	#else
	// By default, always reinit to avoid issues on untested platforms
	ARX_UNUSED(wasOrIsFullscreen);
	#endif
	
	shutdown();
	
#endif
	
}
开发者ID:HerculesCE,项目名称:ArxLibertatis,代码行数:25,代码来源:OpenGLRenderer.cpp


示例2: callback

static void ARX_GLAPIENTRY callback(GLenum source, GLenum type, GLuint id,
                                    GLenum severity, GLsizei length,
                                    const GLchar * message, const void * userParam) {
	
	ARX_UNUSED(length);
	ARX_UNUSED(userParam);
	
	std::ostringstream buffer;
	
	const GLchar * end = message + std::strlen(message);
	while(end != message && (*(end - 1) == '\r' || *(end - 1) == '\n')) {
		end--;
	}
	
	buffer << sourceToString(source) << " " << typeToString(type) << " #"<< id << ": ";
	buffer.write(message, end - message);
	
	switch(severity) {
	case GL_DEBUG_SEVERITY_HIGH_ARB:
		LogError << buffer.str();
		break;
	case GL_DEBUG_SEVERITY_MEDIUM_ARB:
		LogWarning << buffer.str();
		break;
	case GL_DEBUG_SEVERITY_LOW_ARB:
		LogInfo << buffer.str();
		break;
	default:
		break;
	}
}
开发者ID:Drakesinger,项目名称:ArxLibertatis,代码行数:31,代码来源:GLDebug.cpp


示例3: ARX_UNUSED

void CriticalErrorDialog::log(const Source & file, int line, Logger::LogLevel level,
                              const std::string & str) {
	ARX_UNUSED(file), ARX_UNUSED(line);
	
	if(level == Logger::Critical && errorString.empty()) {
		errorString = str;
	}
}
开发者ID:arx,项目名称:ArxLibertatis,代码行数:8,代码来源:CriticalLogger.cpp


示例4: WinMain

INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine,
                   INT nCmdShow) {
	ARX_UNUSED(hInstance);
	ARX_UNUSED(hPrevInstance);
	ARX_UNUSED(lpCmdLine);
	ARX_UNUSED(nCmdShow);
	
	WindowsMain init;
	
	return utf8_main(init.argc, init.argv);
}
开发者ID:Dimoks,项目名称:ArxLibertatis_fork,代码行数:11,代码来源:WindowsMainGUI.cpp


示例5: ARX_UNUSED

bool CrashHandler::setNamedVariable(const std::string & name, const std::string & value) {
#ifdef HAVE_CRASHHANDLER
    if(!isInitialized()) {
        return false;
    }
    return gCrashHandlerImpl->setNamedVariable(name, value);
#else
    ARX_UNUSED(name), ARX_UNUSED(value);
    return false;
#endif
}
开发者ID:DaveMachine,项目名称:ArxLibertatis,代码行数:11,代码来源:CrashHandler.cpp


示例6: AddFile

bool ErrorReport::GetCrashDump(const fs::path & fileName) {
	
#if ARX_PLATFORM == ARX_PLATFORM_WIN32
	bool bHaveDump = false;

	if(fs::exists(m_pCrashInfo->miniDumpTmpFile))
	{
		fs::path fullPath = m_ReportFolder / fileName;
		if(fs::rename(m_pCrashInfo->miniDumpTmpFile, fullPath))
		{
			AddFile(fullPath);
			bHaveDump = true;
		}
	}
	
	return bHaveDump;
	
#else //  ARX_PLATFORM != ARX_PLATFORM_WIN32
	
	ARX_UNUSED(fileName);
	
	// TODO: Write core dump to 
	// fs::path fullPath = m_ReportFolder / fileName;
	
	return getCrashDescription();
	
#endif
	
}
开发者ID:EstrangedGames,项目名称:ArxLibertatis,代码行数:29,代码来源:ErrorReport.cpp


示例7: ARX_UNUSED

void MassIncinerateSpell::Update(float timeDelta)
{
	ARX_UNUSED(timeDelta);
	
	if(ValidIONum(m_caster)) {
		ARX_SOUND_RefreshPosition(m_snd_loop, entities[m_caster]->pos);
	}	
}
开发者ID:Mixone-FinallyHere,项目名称:ArxLibertatis,代码行数:8,代码来源:SpellsLvl10.cpp


示例8: arx_assert

void Thread::setPriority(Priority priority) {
	
	arx_assert(priority >= Lowest && priority <= Highest);
	
	BOOL ret = SetThreadPriority(thread, windowsThreadPriorities[priority - Lowest]);
	arx_assert(ret);
	ARX_UNUSED(ret);
}
开发者ID:Drakesinger,项目名称:ArxLibertatis,代码行数:8,代码来源:Thread.cpp


示例9: getSystemConfiguration

bool getSystemConfiguration(const std::string & name, std::string & result) {
	
#ifdef ARX_HAVE_WINAPI
	
	if(getRegistryValue(HKEY_CURRENT_USER, name, result)) {
		return true;
	}
	
	if(getRegistryValue(HKEY_LOCAL_MACHINE, name, result)) {
		return true;
	}
	
#else
	ARX_UNUSED(name), ARX_UNUSED(result);
#endif
	
	return false;
}
开发者ID:Eli2,项目名称:ArxLibertatis,代码行数:18,代码来源:Environment.cpp


示例10: ARX_UNUSED

void ScreenshotWidget::paintEvent(QPaintEvent * event)
{
	ARX_UNUSED(event);
	QPainter p(this);
	p.setRenderHint(QPainter::SmoothPixmapTransform);

	QPixmap scaledPixmap = m_pixmap.scaled(size(), Qt::KeepAspectRatio);
	p.drawPixmap(0, 0, scaledPixmap);
}
开发者ID:zhaozw,项目名称:ArxLibertatis,代码行数:9,代码来源:ErrorReportDialog.cpp


示例11: onChangedRenderer

	void onChangedRenderer(int pos, const std::string & str) {
		ARX_UNUSED(str);
		
		switch(pos) {
			case 0:  config.window.framework = "auto"; break;
			case 1:  config.window.framework = "SDL";  break;
			default: config.window.framework = "auto"; break;
		}
	}
开发者ID:dreamer-dead,项目名称:ArxLibertatis,代码行数:9,代码来源:MainMenu.cpp


示例12: TheoToEerie_Fast

static EERIE_3DOBJ * TheoToEerie_Fast(const res::path & texpath, const res::path & file, bool pbox) {
	
	EERIE_3DOBJ * ret = ARX_FTL_Load(file);
	if(ret) {
		if(pbox) {
			EERIE_PHYSICS_BOX_Create(ret);
		}
		return ret;
	}
	
#if !BUILD_EDIT_LOADSAVE
	ARX_UNUSED(texpath);
#else
	
	ret = GetExistingEerie(file);
	if(ret) {
		ret = Eerie_Copy(ret);
	}
	
	if(!ret) {
		
		size_t size = 0;
		char * adr = resources->readAlloc(file, size);
		if(!adr) {
			LogWarning << "Object not found: " << file;
			return NULL;
		}
		
		ret = TheoToEerie(adr, size, texpath, file);
		if(!ret) {
			free(adr);
			return NULL;
		}
		
		EERIE_OBJECT_CenterObjectCoordinates(ret);
		free(adr);
	}
	
	CreateNeighbours(ret);
	EERIEOBJECT_AddClothesData(ret);
	KillNeighbours(ret);
	
	if(ret->cdata) {
		EERIE_COLLISION_SPHERES_Create(ret); // Must be out of the Neighbours zone
	}
	
	if(pbox) {
		EERIE_PHYSICS_BOX_Create(ret);
	}
	
	ARX_FTL_Save(fs::paths.user / file.string(), ret);
	
#endif // BUILD_EDIT_LOADSAVE
	
	return ret;
}
开发者ID:byouloh,项目名称:ArxLibertatis,代码行数:56,代码来源:Object.cpp


示例13: ARX_UNUSED

bool Win32Window::initialize(const std::string & title, Vec2i size, bool fullscreen,
                             unsigned depth) {
	ARX_UNUSED(depth);
	
	if(!registerWindowClass()) {
		LogError << "Failed to register the Win32 window class";
		return false;
	}
	
	DWORD windowStyle = fullscreen ?  (WS_POPUP | WS_VISIBLE) : WS_OVERLAPPEDWINDOW;
	DWORD windowExtendedStyle = WS_EX_APPWINDOW;
	
	RECT rcWnd;
	SetRect(&rcWnd, 0, 0, size.x, size.y);
	BOOL hasMenu = GetMenu(m_hWnd) != NULL;
	if(AdjustWindowRectEx(&rcWnd, windowStyle, hasMenu, windowExtendedStyle) != TRUE) {
		LogError << "AdjustWindowRectEx() failed";
		return false;
	}
	
	// Bound the window size to the desktop
	HWND hWndDesktop = GetDesktopWindow();
	RECT rcDesktop;
	GetWindowRect(hWndDesktop, &rcDesktop);
	LONG maxWidth = rcDesktop.right - rcDesktop.left;
	LONG maxHeight = rcDesktop.bottom - rcDesktop.top;
	
	LONG wndWidth = rcWnd.right - rcWnd.left;
	LONG wndHeight = rcWnd.bottom - rcWnd.top;
	wndWidth = std::min(wndWidth, maxWidth);
	wndHeight = std::min(wndHeight, maxHeight);
	
	// Create a window using our window class.
	m_hWnd = CreateWindowEx(windowExtendedStyle, m_WindowClass.lpszClassName, "",
	                        windowStyle, CW_USEDEFAULT, CW_USEDEFAULT, wndWidth, wndHeight, 
	                        0, NULL, (HINSTANCE)GetModuleHandle(NULL), this);
	if(!m_hWnd) {
		LogError << "Couldn't create window";
		return false;
	}
	
	if(SetWindowText(m_hWnd, title.c_str()) == TRUE) {
		title_ = title;
	} else {
		LogWarning << "Couldn't change the window's title";
	}
	
	ShowWindow(m_hWnd, SW_SHOW);
	
	isVisible_ = true;
	isFullscreen_ = fullscreen;
	size_ = size;
	
	return true;
}
开发者ID:AlexMarlo,项目名称:ArxLibertatis,代码行数:55,代码来源:Win32Window.cpp


示例14: dirstat

static mode_t dirstat(void * handle, void * entry) {
	
	arx_assert(entry != NULL);
	fs::path file = ITERATOR_HANDLE(handle)->path / reinterpret_cast<dirent *>(entry)->d_name;
	
	struct stat buf;
	int ret = stat(file.string().c_str(), &buf);
	arx_assert_msg(ret == 0, "stat failed: %d", ret); ARX_UNUSED(ret);
	
	return buf.st_mode;
}
开发者ID:fourks,项目名称:ArxLibertatis,代码行数:11,代码来源:FilesystemPOSIX.cpp


示例15: ARX_UNUSED

int SDLCALL SDL2Window::eventFilter(void * userdata, SDL_Event * event) {

    ARX_UNUSED(userdata);

    // TODO support multiple windows!
    if(s_mainWindow && event->type == SDL_QUIT) {
        return (s_mainWindow->onClose()) ? 1 : 0;
    }

    return 1;
}
开发者ID:striezel,项目名称:ArxLibertatis,代码行数:11,代码来源:SDL2Window.cpp


示例16: pthread_mutex_lock

void Lock::lock() {
	
	pthread_mutex_lock(&mutex);
	
	while(locked) {
		int rc = pthread_cond_wait(&cond, &mutex);
		arx_assert(rc == 0);
		ARX_UNUSED(rc);
	}
	
	locked = true;
	pthread_mutex_unlock(&mutex);
}
开发者ID:lemmel,项目名称:ArxLibertatis,代码行数:13,代码来源:Lock.cpp


示例17: ARX_UNUSED

void MagicSightSpell::Update(float timeDelta)
{
	ARX_UNUSED(timeDelta);
	
	if(m_caster == PlayerEntityHandle) {
		Vec3f pos;
		ARX_PLAYER_FrontPos(&pos);
		ARX_SOUND_RefreshPosition(m_snd_loop, pos);
		
		if(subj.focal > IMPROVED_FOCAL)
			subj.focal -= DEC_FOCAL;
	}	
}
开发者ID:HerculesCE,项目名称:ArxLibertatis,代码行数:13,代码来源:SpellsLvl01.cpp


示例18: ARX_UNUSED

void ColdProtectionSpell::Update(float timeDelta)
{
	ARX_UNUSED(timeDelta);
	
	if(ValidIONum(m_target)) {
		Entity *io = entities[m_target];
		io->halo.flags = HALO_ACTIVE;
		io->halo.color = Color3f(0.2f, 0.2f, 0.45f);
		io->halo.radius = 45.f;
	}
	
	ARX_SOUND_RefreshPosition(m_snd_loop, entities[m_target]->pos);
}
开发者ID:Batora07,项目名称:ArxLibertatis,代码行数:13,代码来源:SpellsLvl04.cpp


示例19: onChangedResolution

	void onChangedResolution(int pos, const std::string & str) {
		ARX_UNUSED(pos);
		
		if(str == AUTO_RESOLUTION_STRING) {
			newWidth = newHeight = 0;
		} else {
			std::stringstream ss(str);
			int iX = config.video.resolution.x;
			int iY = config.video.resolution.y;
			char tmp;
			ss >> iX >> tmp >> iY;
			newWidth = iX;
			newHeight = iY;
		}
	}
开发者ID:dreamer-dead,项目名称:ArxLibertatis,代码行数:15,代码来源:MainMenu.cpp


示例20: ARX_UNUSED

void ErrorReportDialog::onShowFileContent(const QItemSelection& newSelection, const QItemSelection & oldSelection)
{
	ARX_UNUSED(oldSelection);
	const QModelIndexList selectedIndexes = newSelection.indexes();
	if(selectedIndexes.empty())
		return;

	const QModelIndex selectedIndex = selectedIndexes.at(0);
	if(!selectedIndex.isValid())
		return;
	
	fs::path fileName = m_errorReport.GetAttachedFiles()[selectedIndex.row()].path;
	QString ext = fileName.ext().c_str();
	if(ext == ".txt" || ext == ".log" || ext == ".ini" || ext == ".xml")
	{
		QFile textFile(fileName.string().c_str());
		textFile.open(QIODevice::ReadOnly | QIODevice::Text);
		
		QByteArray data;
		data = textFile.readAll();
		
		ui->fileViewText->setText(QString::fromUtf8(data));
		ui->stackedFileViews->setCurrentIndex(0);
	}
	else if(ext == ".jpg" || ext == ".jpeg" || ext == ".bmp" || ext == ".png" || ext == ".gif")
	{
		m_fileViewImage.load(fileName.string().c_str());
		ui->stackedFileViews->setCurrentIndex(1);
	}
	else
	{
		QFile binaryFile(fileName.string().c_str());
		binaryFile.open(QIODevice::ReadOnly);
		
		if(binaryFile.size() > 20 * 1024 * 1024) {
			ui->stackedFileViews->setCurrentIndex(3);
			return;
		}

		QByteArray data;
		data = binaryFile.readAll();

		m_fileViewHex.setData(data);
		ui->stackedFileViews->setCurrentIndex(2);
	}
}
开发者ID:Dimoks,项目名称:ArxLibertatis_fork,代码行数:46,代码来源:ErrorReportDialog.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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