mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-22 22:04:01 -06:00
Functions4U: Fixes from warnings
git-svn-id: svn://ultimatepp.org/upp/trunk@15716 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
e9701ea15a
commit
a17751b66a
6 changed files with 40 additions and 48 deletions
|
|
@ -985,7 +985,7 @@ String SeasonName(int iseason) {
|
|||
return iseason >= 0 && iseason < 4 ? season[iseason] : "";
|
||||
}
|
||||
|
||||
int GetSeason(Date &date) {
|
||||
int GetSeason(const Date &date) {
|
||||
return int((date.month - 1)/3.);
|
||||
}
|
||||
|
||||
|
|
@ -1001,7 +1001,7 @@ String BytesToString(uint64 _bytes, bool units)
|
|||
if (bytes >= 1024) {
|
||||
bytes /= 1024;
|
||||
if (bytes >= 1024) {
|
||||
bytes /= 1024;
|
||||
//bytes /= 1024;
|
||||
ret = Format("%.1f %s", _bytes/(1024*1024*1024*1024.), units ? "Tb" : "");
|
||||
} else
|
||||
ret = Format("%.1f %s", _bytes/(1024*1024*1024.), units ? "Gb" : "");
|
||||
|
|
@ -1776,8 +1776,10 @@ int64 FindStringInFile(const char *file, const String text, int64 pos0) {
|
|||
int64 pos = 0;
|
||||
if (pos0 > 0) {
|
||||
pos = pos0;
|
||||
if (0 == fseek(fp, long(pos0), SEEK_SET))
|
||||
if (0 == fseek(fp, long(pos0), SEEK_SET)) {
|
||||
fclose(fp);
|
||||
return -2;
|
||||
}
|
||||
}
|
||||
int i = 0, c;
|
||||
for (; (c = fgetc(fp)) != EOF; pos++) {
|
||||
|
|
@ -1926,7 +1928,6 @@ bool FileDataArray::Init(String , FileDataArray &orig, FileDiffArray &diff)
|
|||
else
|
||||
fileCount--;
|
||||
break;
|
||||
break;
|
||||
case 'p':
|
||||
SetLastError(t_("Problem found")); // To Fix
|
||||
//return false;
|
||||
|
|
@ -2084,7 +2085,7 @@ bool operator<(const FileData& a, const FileData& b)
|
|||
return a.isFolder;
|
||||
}
|
||||
|
||||
bool CheckFileData(FileData &data, String &, String &, String &lowrelFileName, String &lowfileName, bool isFolder) {
|
||||
bool CheckFileData(FileData &data, String &, String &, const String &lowrelFileName, const String &lowfileName, bool isFolder) {
|
||||
if (data.isFolder == isFolder) {
|
||||
if (ToLower(data.fileName) == lowfileName) {
|
||||
if (ToLower(data.relFilename) == lowrelFileName)
|
||||
|
|
@ -2558,10 +2559,6 @@ String WideToString(LPCWSTR wcs, int len) {
|
|||
|
||||
#if defined(PLATFORM_WIN32) || defined (PLATFORM_WIN64)
|
||||
|
||||
Dl::Dl() {
|
||||
hinstLib = 0;
|
||||
}
|
||||
|
||||
Dl::~Dl() {
|
||||
if (hinstLib)
|
||||
if (FreeLibrary(hinstLib) == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue