Replace all include guard ifdefs with "#pragma once"

This commit is contained in:
lioncash
2014-02-10 13:54:46 -05:00
committed by Lioncash
parent a0a65a2906
commit d2038049f5
462 changed files with 676 additions and 2308 deletions

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _AVIDUMP_H
#define _AVIDUMP_H
#pragma once
#ifdef _WIN32
#include <windows.h>
@ -32,5 +31,3 @@ class AVIDump
static void Stop();
};
#endif // _AVIDUMP_H

View File

@ -7,8 +7,7 @@
// Video backend must define these functions
// ------------------------------------------
#ifndef _BPFUNCTIONS_H
#define _BPFUNCTIONS_H
#pragma once
#include "BPMemory.h"
#include "VideoCommon.h"
@ -41,5 +40,3 @@ bool GetConfig(const int &type);
void SetTextureMode(const BPCmd &bp);
void SetInterlacingMode(const BPCmd &bp);
};
#endif // _BPFUNCTIONS_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _BPMEMORY_H
#define _BPMEMORY_H
#pragma once
#include "Common.h"
@ -1051,5 +1050,3 @@ extern BPMemory bpmem;
void LoadBPReg(u32 value0);
void GetBPRegInfo(const u8* data, char* name, size_t name_size, char* desc, size_t desc_size);
#endif // _BPMEMORY_H

View File

@ -2,13 +2,10 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _BPSTRUCTS_H_
#define _BPSTRUCTS_H_
#pragma once
#include "BPMemory.h"
void BPInit();
void LoadBPReg(u32 value0);
void BPReload();
#endif // _BPSTRUCTS_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _CPMEMORY_H
#define _CPMEMORY_H
#pragma once
#include "Common.h"
@ -253,5 +252,3 @@ void LoadCPReg(u32 SubCmd, u32 Value);
// Fills memory with data from CP regs
void FillCPMemoryArray(u32 *memory);
#endif // _CPMEMORY_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _COMMANDPROCESSOR_H
#define _COMMANDPROCESSOR_H
#pragma once
#include "Common.h"
#include "VideoBackendBase.h"
@ -160,7 +159,3 @@ void Update();
extern volatile u32 VITicks;
} // namespace CommandProcessor
#endif // _COMMANDPROCESSOR_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _CONSTANTMANAGER_H
#define _CONSTANTMANAGER_H
#pragma once
// all constant buffer attributes must be 16 bytes aligned, so this are the only allowed components:
typedef float float4[4];
@ -38,5 +37,3 @@ struct VertexShaderConstants
float4 posttransformmatrices[64];
float4 depthparams;
};
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _DATAREADER_H
#define _DATAREADER_H
#pragma once
#include "VertexManagerBase.h"
@ -169,5 +168,3 @@ private:
u8 *buffer;
int offset;
};
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _GFX_DEBUGGER_H_
#define _GFX_DEBUGGER_H_
#pragma once
class GFXDebuggerBase
{
@ -62,6 +61,3 @@ void GFXDebuggerUpdateScreen();
#define GFX_DEBUGGER_PAUSE_AT(event,update) {if (((GFXDebuggerToPauseAtNext & event) && --GFXDebuggerEventToPauseCount<=0) || GFXDebuggerPauseFlag) GFXDebuggerToPause(update);}
#define GFX_DEBUGGER_PAUSE_LOG_AT(event,update,dumpfunc) {if (((GFXDebuggerToPauseAtNext & event) && --GFXDebuggerEventToPauseCount<=0) || GFXDebuggerPauseFlag) {{dumpfunc};GFXDebuggerToPause(update);}}
#define GFX_DEBUGGER_LOG_AT(event,dumpfunc) {if (( GFXDebuggerToPauseAtNext & event ) ) {{dumpfunc};}}
#endif // _GFX_DEBUGGER_H_

View File

@ -1,5 +1,4 @@
#ifndef _EMUWINDOW_H
#define _EMUWINDOW_H
#pragma once
#include <windows.h>
@ -17,5 +16,3 @@ void OSDMenu(WPARAM wParam);
void SetWindowText(const TCHAR* text);
}
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _FPS_COUNTER_H_
#define _FPS_COUNTER_H_
#pragma once
// Initializes the FPS counter.
void InitFPSCounter();
@ -11,5 +10,3 @@ void InitFPSCounter();
// Called when a frame is rendered. Returns the value to be displayed on
// screen as the FPS counter (updated every second).
int UpdateFPSCounter();
#endif // _FPS_COUNTER_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _FIFO_H
#define _FIFO_H
#pragma once
#include "Common.h"
#include "VideoBackendBase.h"
@ -34,5 +33,3 @@ void Fifo_SetRendering(bool bEnabled);
// Implemented by the Video Backend
void VideoFifo_CheckAsyncRequest();
#endif // _FIFO_H

View File

@ -1,6 +1,4 @@
#ifndef _FRAMEBUFFERMANAGERBASE_H
#define _FRAMEBUFFERMANAGERBASE_H
#pragma once
#include <list>
@ -98,5 +96,3 @@ private:
};
extern FramebufferManagerBase *g_framebuffer_manager;
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _HIRESTEXTURES_H
#define _HIRESTEXTURES_H
#pragma once
#include <map>
#include "VideoCommon.h"
@ -16,5 +15,3 @@ bool HiresTexExists(const char *filename);
PC_TexFormat GetHiresTex(const char *fileName, unsigned int *pWidth, unsigned int *pHeight, unsigned int *required_size, int texformat, unsigned int data_size, u8 *data);
};
#endif // _HIRESTEXTURES_H

View File

@ -2,13 +2,9 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _IMAGEWRITE_H
#define _IMAGEWRITE_H
#pragma once
#include "Common.h"
bool SaveData(const char* filename, const char* pdata);
bool TextureToPng(u8* data, int row_stride, const std::string filename, int width, int height, bool saveAlpha = true);
#endif // _IMAGEWRITE_H

View File

@ -5,8 +5,8 @@
// This is currently only used by the DX backend, but it may make sense to
// use it in the GL backend or a future DX10 backend too.
#ifndef _INDEXGENERATOR_H
#define _INDEXGENERATOR_H
#pragma once
#include "CommonTypes.h"
class IndexGenerator
@ -45,5 +45,3 @@ private:
static u16 *BASEIptr;
static u32 base_index;
};
#endif // _INDEXGENERATOR_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _LIGHTINGSHADERGEN_H_
#define _LIGHTINGSHADERGEN_H_
#pragma once
#include "ShaderGenCommon.h"
#include "NativeVertexFormat.h"
@ -260,5 +259,3 @@ static void GenerateLightingShader(T& object, LightingUidData& uid_data, int com
object.Write("}\n");
}
}
#endif // _LIGHTINGSHADERGEN_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _LOOKUPTABLES_H
#define _LOOKUPTABLES_H
#pragma once
#include "Common.h"
@ -30,5 +29,3 @@ inline u8 Convert6To8(u8 v)
// Swizzle bits: 00123456 -> 12345612
return (v << 2) | (v >> 4);
}
#endif // _LOOKUPTABLES_H

View File

@ -1,6 +1,4 @@
#ifndef _VIDEOCOMMON_MAINBASE_H_
#define _VIDEOCOMMON_MAINBASE_H_
#pragma once
#include "CommonTypes.h"
@ -11,5 +9,3 @@ extern volatile u32 s_swapRequested;
void VideoFifo_CheckEFBAccess();
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
#endif

View File

@ -1,22 +1,8 @@
// Copyright (C) 2003 Dolphin Project.
// Copyright 2013 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _NATIVEVERTEXFORMAT_H
#define _NATIVEVERTEXFORMAT_H
#pragma once
#include "Common.h"
@ -116,5 +102,3 @@ protected:
u32 vertex_stride;
};
#endif // _NATIVEVERTEXFORMAT_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _OSD_H_
#define _OSD_H_
#pragma once
#include <functional>
#include <string>
@ -27,5 +26,3 @@ typedef std::function<void()> Callback;
void AddCallback(CallbackType type, Callback cb);
void DoCallbacks(CallbackType type);
} // namespace OSD
#endif // _OSD_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _OPCODE_DECODING_H
#define _OPCODE_DECODING_H
#pragma once
#define GX_NOP 0x00
@ -39,4 +38,3 @@ void OpcodeDecoder_Init();
void OpcodeDecoder_Shutdown();
u32 OpcodeDecoder_Run(bool skipped_frame);
void InterpretDisplayList(u32 address, u32 size);
#endif // _OPCODE_DECODING_H

View File

@ -1,5 +1,4 @@
#ifndef _PERFQUERY_BASE_H_
#define _PERFQUERY_BASE_H_
#pragma once
#include "CommonTypes.h"
@ -54,5 +53,3 @@ public:
};
extern PerfQueryBase* g_perf_query;
#endif // _PERFQUERY_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _PIXELENGINE_H
#define _PIXELENGINE_H
#pragma once
#include "CommonTypes.h"
class PointerWrap;
@ -74,5 +73,3 @@ extern u16 bbox[4];
extern bool bbox_active;
} // end of namespace PixelEngine
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef GCOGL_PIXELSHADER_H
#define GCOGL_PIXELSHADER_H
#pragma once
#include "VideoCommon.h"
#include "ShaderGenCommon.h"
@ -141,5 +140,3 @@ typedef ShaderConstantProfile PixelShaderConstantProfile; // TODO: Obsolete
void GeneratePixelShaderCode(PixelShaderCode& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
void GetPixelShaderUid(PixelShaderUid& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
void GetPixelShaderConstantProfile(PixelShaderConstantProfile& object, DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType, u32 components);
#endif // GCOGL_PIXELSHADER_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _PIXELSHADERMANAGER_H
#define _PIXELSHADERMANAGER_H
#pragma once
#include "BPMemory.h"
#include "XFMemory.h"
@ -46,6 +45,3 @@ public:
static PixelShaderConstants constants;
static bool dirty;
};
#endif // _PIXELSHADERMANAGER_H

View File

@ -12,8 +12,7 @@
// Next frame, that one is scanned out and the other one gets the copy. = double buffering.
// ---------------------------------------------------------------------------------------------
#ifndef _COMMON_RENDERBASE_H_
#define _COMMON_RENDERBASE_H_
#pragma once
#include "VideoCommon.h"
#include "Thread.h"
@ -162,5 +161,3 @@ private:
extern Renderer *g_renderer;
void UpdateViewport();
#endif // _COMMON_RENDERBASE_H_

View File

@ -1,22 +1,8 @@
// Copyright (C) 2003 Dolphin Project.
// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2
// Refer to the license.txt file included.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, version 2.0.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License 2.0 for more details.
// A copy of the GPL 2.0 should have been included with the program.
// If not, see http://www.gnu.org/licenses/
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _SHADERGENCOMMON_H
#define _SHADERGENCOMMON_H
#pragma once
#include <stdio.h>
#include <stdarg.h>
@ -258,5 +244,3 @@ private:
std::map<UidT,std::string> m_shaders;
std::vector<UidT> m_uids;
};
#endif // _SHADERGENCOMMON_H

View File

@ -6,8 +6,7 @@
#include "VideoCommon.h"
#include <vector>
#ifndef _STATISTICS_H
#define _STATISTICS_H
#pragma once
struct Statistics
{
@ -91,5 +90,3 @@ extern Statistics stats;
#define ADDSTAT(a,b) ;
#define SETSTAT(a,x) ;
#endif
#endif // _STATISTICS_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _TEXTURECACHEBASE_H
#define _TEXTURECACHEBASE_H
#pragma once
#include <map>
@ -140,5 +139,3 @@ private:
};
extern TextureCache *g_texture_cache;
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _TEXTURECONVERSIONSHADER_H_
#define _TEXTURECONVERSIONSHADER_H_
#pragma once
#include "Common.h"
#include "TextureDecoder.h"
@ -16,6 +15,3 @@ u16 GetEncodedSampleCount(u32 format);
const char *GenerateEncodingShader(u32 format, API_TYPE ApiType = API_OPENGL);
}
#endif // _TEXTURECONVERSIONSHADER_H_

View File

@ -2,9 +2,10 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _TEXTUREDECODER_H
#define _TEXTUREDECODER_H
#pragma once
#include "Hash.h"
enum
{
TMEM_SIZE = 1024*1024,
@ -76,5 +77,3 @@ void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth
void TexDecoder_DecodeTexelRGBA8FromTmem(u8 *dst, const u8 *src_ar, const u8* src_gb, int s, int t, int imageWidth);
PC_TexFormat TexDecoder_DecodeRGBA8FromTmem(u8* dst, const u8 *src_ar, const u8 *src_gb, int width, int height);
void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VERTEXLOADER_H
#define _VERTEXLOADER_H
#pragma once
// Top vertex loaders
// Metroid Prime: P I16-flt N I16-s16 T0 I16-u16 T1 i16-flt
@ -140,5 +139,3 @@ private:
void WriteSetVariable(int bits, void *address, Gen::OpArg dest);
#endif
};
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VERTEXLOADERMANAGER_H
#define _VERTEXLOADERMANAGER_H
#pragma once
#include "Common.h"
#include <string>
@ -23,5 +22,3 @@ namespace VertexLoaderManager
};
void RecomputeCachedArraybases();
#endif // _VERTEXLOADERMANAGER_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VERTEXLOADERCOLOR_H
#define _VERTEXLOADERCOLOR_H
#pragma once
void LOADERDECL Color_ReadDirect_24b_888();
void LOADERDECL Color_ReadDirect_32b_888x();
@ -25,5 +24,3 @@ void LOADERDECL Color_ReadIndex16_32b_888x();
void LOADERDECL Color_ReadIndex16_16b_4444();
void LOADERDECL Color_ReadIndex16_24b_6666();
void LOADERDECL Color_ReadIndex16_32b_8888();
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VERTEXLOADER_NORMAL_H
#define _VERTEXLOADER_NORMAL_H
#pragma once
#include "Common.h"
#include "CommonTypes.h"
@ -72,5 +71,3 @@ private:
static Set m_Table[NUM_NRM_TYPE][NUM_NRM_INDICES][NUM_NRM_ELEMENTS][NUM_NRM_FORMAT];
};
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef VERTEXLOADER_TEXCOORD_H
#define VERTEXLOADER_TEXCOORD_H
#pragma once
#include "NativeVertexFormat.h"
@ -24,5 +23,3 @@ public:
// It is important to synchronize tcIndex.
static TPipelineFunction GetDummyFunction();
};
#endif

View File

@ -1,6 +1,4 @@
#ifndef _VERTEXMANAGERBASE_H
#define _VERTEXMANAGERBASE_H
#pragma once
#include "Common.h"
#include <vector>
@ -64,5 +62,3 @@ private:
};
extern VertexManager *g_vertex_manager;
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef GCOGL_VERTEXSHADER_H
#define GCOGL_VERTEXSHADER_H
#pragma once
#include "XFMemory.h"
#include "VideoCommon.h"
@ -91,5 +90,3 @@ typedef ShaderCode VertexShaderCode; // TODO: Obsolete..
void GetVertexShaderUid(VertexShaderUid& object, u32 components, API_TYPE api_type);
void GenerateVertexShaderCode(VertexShaderCode& object, u32 components, API_TYPE api_type);
void GenerateVSOutputStructForGS(ShaderCode& object, API_TYPE api_type);
#endif // GCOGL_VERTEXSHADER_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VERTEXSHADERMANAGER_H
#define _VERTEXSHADERMANAGER_H
#pragma once
#include "VertexShaderGen.h"
#include "ConstantManager.h"
@ -38,5 +37,3 @@ public:
static VertexShaderConstants constants;
static bool dirty;
};
#endif // _VERTEXSHADERMANAGER_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef VIDEO_BACKEND_H_
#define VIDEO_BACKEND_H_
#pragma once
#include <string>
#include <vector>
@ -181,5 +180,3 @@ protected:
void InitializeShared();
void InvalidState();
};
#endif

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VIDEOCOMMON_H
#define _VIDEOCOMMON_H
#pragma once
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@ -132,5 +131,3 @@ inline unsigned int GetPow2(unsigned int val)
++ret;
return ret;
}
#endif // _VIDEOCOMMON_H

View File

@ -9,8 +9,7 @@
// at the start of every frame. Noone should ever change members of g_ActiveConfig
// directly.
#ifndef _VIDEO_CONFIG_H_
#define _VIDEO_CONFIG_H_
#pragma once
#include "Common.h"
#include "VideoCommon.h"
@ -168,5 +167,3 @@ extern VideoConfig g_ActiveConfig;
// Called every frame.
void UpdateActiveConfig();
#endif // _VIDEO_CONFIG_H_

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _VIDEOSTATE_H
#define _VIDEOSTATE_H
#pragma once
#include "Common.h"
#include "ChunkFile.h"
@ -11,5 +10,3 @@
void VideoCommon_DoState(PointerWrap &p);
void VideoCommon_RunLoop(bool enable);
void VideoCommon_Init();
#endif // _VIDEOSTATE_H

View File

@ -2,8 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _XFMEMORY_H
#define _XFMEMORY_H
#pragma once
#include "Common.h"
@ -274,5 +273,3 @@ extern u32 xfmem[XFMEM_SIZE];
void LoadXFReg(u32 transferSize, u32 address, u32 *pData);
void LoadIndexedXF(u32 val, int array);
#endif // _XFMEMORY_H

View File

@ -2,9 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
#ifndef _XFSTRUCTS_H
#define _XFSTRUCTS_H
#pragma once
#include "XFMemory.h"
#endif // _XFSTRUCTS_H