#pragma once cleanup

This commit is contained in:
src-dev
2025-12-04 18:49:17 -08:00
parent 4a34d78770
commit ce0ca9a711
15 changed files with 26 additions and 47 deletions
+1
View File
@@ -1,4 +1,5 @@
#pragma once
#include "PaneModel.h"
#include "FsUtil.h"
+1
View File
@@ -1,4 +1,5 @@
#pragma once
#include <xtl.h>
#include "XBFont.h"
#include "XBInput.h"
-2
View File
@@ -50,10 +50,8 @@
<ClInclude Include="DebugPrint.h" />
<ClInclude Include="Configuration.h" />
<ClInclude Include="FileBrowserApp.h" />
<ClInclude Include="font_xpr.h" />
<ClInclude Include="FsUtil.h" />
<ClInclude Include="GfxPrims.h" />
<ClInclude Include="font_xpr.h" />
<ClInclude Include="OnScreenKeyboard.h" />
<ClInclude Include="PaneModel.h" />
<ClInclude Include="PaneRenderer.h" />
-3
View File
@@ -197,9 +197,6 @@
<ClInclude Include="font_xpr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="font_xpr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TextUtils.h">
<Filter>Header Files</Filter>
</ClInclude>
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef FILEBROWSERAPP_H
#define FILEBROWSERAPP_H
#pragma once
/*
===============================================================================
@@ -182,5 +181,3 @@ private:
FLOAT kPaddingX; // left/right text padding inside pane
FLOAT kScrollBarW; // scrollbar track width
};
#endif // FILEBROWSERAPP_H
+3 -5
View File
@@ -1,5 +1,5 @@
#ifndef FSUTIL_H
#define FSUTIL_H
#pragma once
/*
============================================================================
FsUtil
@@ -124,6 +124,4 @@ int DvdDetectMediaSimple(char* outLabel, size_t cap);
DWORD DvdGetDriveStateOneShot(void);
// Drop old CDFS instance and remap D: cleanly; touches D:\ to force a fresh view.
void DvdColdRemount();
#endif // FSUTIL_H
void DvdColdRemount();
+1
View File
@@ -1,4 +1,5 @@
#pragma once
#include <xtl.h>
// Transformed/lit vertex for solid rects
+1
View File
@@ -1,4 +1,5 @@
#pragma once
#include <xtl.h>
#include <wchar.h>
#include <string.h>
+2 -5
View File
@@ -1,5 +1,4 @@
#ifndef PANEMODEL_H
#define PANEMODEL_H
#pragma once
#include <vector>
#include "FsUtil.h"
@@ -12,6 +11,4 @@ struct Pane {
int sel;
int scroll;
Pane(){ curPath[0]=0; mode=0; sel=0; scroll=0; }
};
#endif // PANEMODEL_H
};
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef PANERENDERER_H
#define PANERENDERER_H
#pragma once
#include <xtl.h>
#include "XBFont.h"
@@ -108,5 +107,3 @@ private:
// Shared width backing field
static FLOAT s_sharedSizeColW;
};
#endif // PANERENDERER_H
+1 -4
View File
@@ -1,5 +1,4 @@
#ifndef UNZIPLIBUTIL_H
#define UNZIPLIBUTIL_H
#pragma once
#include "unzipLIB.h"
#include "FileBrowserApp.h"
@@ -21,5 +20,3 @@ int32_t ZipFile_Seek(void* p, int32_t position, int iType);
int ExtractCurrentFileWithProgress(UNZIP* zip, const char* dst, bool overwrite);
void FreeUnZipBuffer();
#endif // UNZIPLIBUTIL_H
+4 -3
View File
@@ -2,7 +2,7 @@
#include <StdLib.h>
#include <String.h>
int CreateBak(const char* src, bool ovr, int (*Upd)(unsigned long long)) {
int CreateBak(const char* src, bool ovr, bool (*cb)(unsigned long long)) {
char dst[512];
strcpy(dst, src);
@@ -42,8 +42,9 @@ int CreateBak(const char* src, bool ovr, int (*Upd)(unsigned long long)) {
return E_FWRITE_DST;
}
if (Upd) {
if (Upd(wb) != 0) {
if (cb) {
if (!cb(wb)) {
free(buf);
break;
}
}
+4 -7
View File
@@ -1,5 +1,4 @@
#ifndef XPATCHLIB_H
#define XPATCHLIB_H
#pragma once
#include <StdIO.h>
@@ -25,8 +24,6 @@ typedef enum {
E_OUT_OF_MEMORY,
} ErrorCode;
int CreateBak(const char* src, bool ovr, int (*Upd)(unsigned long long));
int RestoreBak(const char* src, bool ovr);
int ReadVarInt(FILE* fp, unsigned int* ui);
#endif // XPATCHLIB_H
int CreateBak(const char* source, bool overwrite, bool (*Callback)(unsigned long long));
int RestoreBak(const char* source, bool overwrite);
int ReadVarInt(FILE* fp, unsigned int* ui);
+4 -5
View File
@@ -4,13 +4,12 @@
// ------------------------------------------------------------------
// CreateBak function with added prog (src-dev)
// ------------------------------------------------------------------
int UpdateBakProgress(ULONGLONG wb) {
bool UpdateBakProgress(ULONGLONG wb) {
if (CopyProgress::g_copyProgFn) {
if (!CopyProgress::g_copyProgFn(-wb, NULL, NULL, CopyProgress::g_copyProgUser)) {
return -1;
return false;
}
return 0;
return true;
}
return false;
}
+2 -5
View File
@@ -1,11 +1,8 @@
#ifndef XPATCHLIBUTIL_H
#define XPATCHLIBUTIL_H
#pragma once
#include "FileBrowserApp.h"
// ------------------------------------------------------------------
// CreateBak function with added progress (src-dev)
// ------------------------------------------------------------------
int UpdateBakProgress(unsigned long long wb);
#endif // XPATCHLIBUTIL_H
bool UpdateBakProgress(ULONGLONG wb);