本文整理汇总了C++中ARX_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ ARX_UNUSED函数的具体用法?C++ ARX_UNUSED怎么用?C++ ARX_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ARX_UNUSED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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
}
示例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
}
示例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);
}
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}