Remaining minimal changes required to compile

This commit is contained in:
ONBcode 2024-04-09 15:51:13 -03:00
parent c5ddfd83ad
commit 85285d4478
7 changed files with 24 additions and 14 deletions

View File

@ -134,7 +134,7 @@ class TabCompetition :
void selectExportSplitOptions(gdioutput &gdi); void selectExportSplitOptions(gdioutput &gdi);
void showSelectId(std::pair<bool, bool>& priSecondId, gdioutput& gdi); void showSelectId(std::pair<bool, bool>& priSecondId, gdioutput& gdi);
pair<string, string> TabCompetition::getPreferredIdTypes(gdioutput& gdi); pair<string, string> getPreferredIdTypes(gdioutput& gdi);
void saveExtraFields(gdioutput& gdi, oEvent::ExtraFieldContext type); void saveExtraFields(gdioutput& gdi, oEvent::ExtraFieldContext type);

View File

@ -169,7 +169,8 @@ int TabTeam::searchCB(gdioutput &gdi, int type, void *data) {
void TabTeam::selectTeam(gdioutput &gdi, pTeam t) void TabTeam::selectTeam(gdioutput &gdi, pTeam t)
{ {
if (gdioutput* gdi_comments = getExtraWindow("comments", false); gdi_comments) gdioutput* gdi_comments = getExtraWindow("comments", false);
if ( gdi_comments)
gdi_comments->closeWindow(); gdi_comments->closeWindow();
if (t){ if (t){
@ -1259,7 +1260,8 @@ int TabTeam::teamCB(gdioutput &gdi, GuiEventType type, BaseInfo* data) {
if (teamId>0) if (teamId>0)
save(gdi, true); save(gdi, true);
if (gdioutput* gdi_settings = getExtraWindow("comments", false); gdi_settings) gdioutput* gdi_settings = getExtraWindow("comments", false);
if ( gdi_settings)
gdi_settings->closeWindow(); gdi_settings->closeWindow();
return true; return true;

View File

@ -1075,7 +1075,7 @@ void IOF30Interface::readEntryList(gdioutput &gdi, xmlobject &xo, bool removeNon
for (int leg = 0; leg < allT[k]->getNumRunners(); leg++) { for (int leg = 0; leg < allT[k]->getNumRunners(); leg++) {
pRunner r = allT[k]->getRunner(leg); pRunner r = allT[k]->getRunner(leg);
if (r && r->getCourseId() > 0) { if (r && r->getCourseId() > 0) {
pair key(allT[k]->getId(), leg); pair<int, int> key(allT[k]->getId(), leg);
teamLegToFixedCourse[key] = r->getCourseId(); teamLegToFixedCourse[key] = r->getCourseId();
} }
} }
@ -1344,7 +1344,7 @@ void IOF30Interface::readEntryList(gdioutput &gdi, xmlobject &xo, bool removeNon
for (int leg = 0; leg < allT[k]->getNumRunners(); leg++) { for (int leg = 0; leg < allT[k]->getNumRunners(); leg++) {
pRunner r = allT[k]->getRunner(leg); pRunner r = allT[k]->getRunner(leg);
if (r) { if (r) {
pair key(allT[k]->getId(), leg); pair<int, int> key(allT[k]->getId(), leg);
auto res = teamLegToFixedCourse.find(key); auto res = teamLegToFixedCourse.find(key);
if (res == teamLegToFixedCourse.end()) { if (res == teamLegToFixedCourse.end()) {
r->setCourseId(0); r->setCourseId(0);

View File

@ -65,7 +65,7 @@ private:
int lineIx, int ix) const; int lineIx, int ix) const;
void ListEditor::editDlgStart(gdioutput& gdi, int id, const char* title, int& x1, int& y1, int& boxY); void editDlgStart(gdioutput& gdi, int id, const char* title, int& x1, int& y1, int& boxY);
void editListPost(gdioutput &gdi, const MetaListPost &mlp, int id); void editListPost(gdioutput &gdi, const MetaListPost &mlp, int id);
void editImage(gdioutput& gdi, const MetaListPost& mlp, int id); void editImage(gdioutput& gdi, const MetaListPost& mlp, int id);

View File

@ -1433,7 +1433,7 @@ public:
/** Do some operation and disable (global) reevaluate/update */ /** Do some operation and disable (global) reevaluate/update */
template<typename OP> template<typename OP>
void noReevaluateOperation(OP& operation) { void noReevaluateOperation(const OP& operation) {
bool origState = disableRecalculate; bool origState = disableRecalculate;
disableRecalculate = true; disableRecalculate = true;
try { try {

View File

@ -5263,7 +5263,7 @@ void oListInfo::setupLinks() const {
void oListInfo::shrinkSize() { void oListInfo::shrinkSize() {
auto& scale = [](int& format) -> double { auto scale = [](int& format) -> double {
int highFormat = format & ~0xFF; int highFormat = format & ~0xFF;
format &= 0xFF; format &= 0xFF;

View File

@ -147,7 +147,9 @@ wstring do_extract_currentfile(unzFile uf, const wstring &baseDir, const char* p
if (err!=UNZ_OK) if (err!=UNZ_OK)
throw std::exception(zipError); throw std::exception(zipError);
fout = fopen64(write_filename.c_str(),L"wb"); //fout = fopen64(write_filename.c_str(),L"wb");
// fopen64 maps to fopen (const char parameters); need to be _wfopen (const wchars)
errno_t err = _wfopen_s(&fout, write_filename.c_str(), L"wb");
// some zipfile doesn't contain directory alone before file // some zipfile doesn't contain directory alone before file
if ((fout==NULL) && createSubdir && if ((fout==NULL) && createSubdir &&
@ -156,7 +158,8 @@ wstring do_extract_currentfile(unzFile uf, const wstring &baseDir, const char* p
*(filename_withoutpath-1)='\0'; *(filename_withoutpath-1)='\0';
makedir(write_filename.c_str()); makedir(write_filename.c_str());
*(filename_withoutpath-1)=c; *(filename_withoutpath-1)=c;
fout=fopen64(write_filename.c_str(),L"wb"); //fout=fopen64(write_filename.c_str(),L"wb");
err = _wfopen_s(&fout, write_filename.c_str(), L"wb");
} }
if (fout==NULL) { if (fout==NULL) {
@ -273,7 +276,9 @@ int check_exist_file(const wchar_t* filename)
{ {
FILE* ftestexist; FILE* ftestexist;
int ret = 1; int ret = 1;
ftestexist = fopen64(filename,L"rb"); //ftestexist = fopen64(filename,L"rb");
errno_t err = _wfopen_s(&ftestexist, filename, L"rb");
if (ftestexist==NULL) if (ftestexist==NULL)
ret = 0; ret = 0;
else else
@ -324,7 +329,9 @@ int isLargeFile(const wchar_t* filename)
{ {
int largeFile = 0; int largeFile = 0;
ZPOS64_T pos = 0; ZPOS64_T pos = 0;
FILE* pFile = fopen64(filename, L"rb"); //FILE* pFile = fopen64(filename, L"rb");
FILE* pFile = NULL;
errno_t err = _wfopen_s(&pFile, filename, L"rb");
if (pFile != NULL) { if (pFile != NULL) {
fseeko64(pFile, 0, SEEK_END); fseeko64(pFile, 0, SEEK_END);
@ -423,8 +430,9 @@ int zip(const wchar_t *zipfilename, const char *password, const vector<wstring>
throw meosException(eb); throw meosException(eb);
} }
else { else {
fin = fopen64(wfn.c_str(),L"rb"); //fin = fopen64(wfn.c_str(),L"rb");
if (fin==NULL) { errno_t err = _wfopen_s(&fin, wfn.c_str(), L"rb");
if (fin==NULL) {
swprintf_s(eb, L"Error opening %s for reading",filenameinzip); swprintf_s(eb, L"Error opening %s for reading",filenameinzip);
throw meosException(eb); throw meosException(eb);
} }