mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 10:57:58 +08:00
Fix compiler warnings (VS 2019)
Found with warning level: /W3
This commit is contained in:
+1
-1
@@ -1609,7 +1609,7 @@ content key keyboard layout
|
|||||||
} else {
|
} else {
|
||||||
Fl::e_text = ( (Fl::e_state & FL_SHIFT) ? plus_other_char_utf8 : (char*)"+" );
|
Fl::e_text = ( (Fl::e_state & FL_SHIFT) ? plus_other_char_utf8 : (char*)"+" );
|
||||||
}
|
}
|
||||||
Fl::e_length = strlen(Fl::e_text);
|
Fl::e_length = (int)strlen(Fl::e_text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end of processing of the +-containing key
|
// end of processing of the +-containing key
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ int Fl_PDF_GDI_File_Surface::begin_job(const char *defaultfname, char **perr_mes
|
|||||||
char *buffer = new char[count];
|
char *buffer = new char[count];
|
||||||
DEVMODEA *pDevMode = (DEVMODEA*)buffer;
|
DEVMODEA *pDevMode = (DEVMODEA*)buffer;
|
||||||
memset(buffer, 0, count);
|
memset(buffer, 0, count);
|
||||||
pDevMode->dmSize = count;
|
pDevMode->dmSize = (WORD)count;
|
||||||
count = DocumentPropertiesA(hwndOwner, hPr2, pdf_printer_name_, pDevMode, NULL, DM_OUT_BUFFER | DM_IN_PROMPT);
|
count = DocumentPropertiesA(hwndOwner, hPr2, pdf_printer_name_, pDevMode, NULL, DM_OUT_BUFFER | DM_IN_PROMPT);
|
||||||
ClosePrinter(hPr2);
|
ClosePrinter(hPr2);
|
||||||
if (count == IDCANCEL || count < 0) { delete[] buffer; return 1; }
|
if (count == IDCANCEL || count < 0) { delete[] buffer; return 1; }
|
||||||
@@ -171,7 +171,7 @@ int Fl_PDF_GDI_File_Surface::begin_job(const char *defaultfname, char **perr_mes
|
|||||||
wchar_t docName [256];
|
wchar_t docName [256];
|
||||||
wchar_t outName [256];
|
wchar_t outName [256];
|
||||||
fl_utf8towc("FLTK", 4, docName, 256);
|
fl_utf8towc("FLTK", 4, docName, 256);
|
||||||
fl_utf8towc(fnfc.filename(), strlen(fnfc.filename()), outName, 256);
|
fl_utf8towc(fnfc.filename(), (unsigned int)strlen(fnfc.filename()), outName, 256);
|
||||||
memset(&di, 0, sizeof(DOCINFOW));
|
memset(&di, 0, sizeof(DOCINFOW));
|
||||||
di.cbSize = sizeof(DOCINFOW);
|
di.cbSize = sizeof(DOCINFOW);
|
||||||
di.lpszDocName = (LPCWSTR)docName;
|
di.lpszDocName = (LPCWSTR)docName;
|
||||||
@@ -231,7 +231,7 @@ int Fl_PDF_GDI_File_Surface::begin_document(const char* outfname,
|
|||||||
di.cbSize = sizeof(DOCINFOW);
|
di.cbSize = sizeof(DOCINFOW);
|
||||||
di.lpszDocName = (LPCWSTR)docName;
|
di.lpszDocName = (LPCWSTR)docName;
|
||||||
di.lpszOutput = (LPCWSTR)outName;
|
di.lpszOutput = (LPCWSTR)outName;
|
||||||
fl_utf8towc(outfname, strlen(outfname), outName, 256);
|
fl_utf8towc(outfname, (unsigned int)strlen(outfname), outName, 256);
|
||||||
err = StartDocW(hPr, &di);
|
err = StartDocW(hPr, &di);
|
||||||
if (err <= 0) {
|
if (err <= 0) {
|
||||||
DWORD dw = GetLastError();
|
DWORD dw = GetLastError();
|
||||||
|
|||||||
+1
-1
@@ -66,7 +66,7 @@
|
|||||||
*/
|
*/
|
||||||
static float tb_project_to_sphere(float, float, float);
|
static float tb_project_to_sphere(float, float, float);
|
||||||
static void normalize_quat(float [4]);
|
static void normalize_quat(float [4]);
|
||||||
static float max_velocity = 0.1;
|
static float max_velocity = 0.1f;
|
||||||
|
|
||||||
void
|
void
|
||||||
vzero(float *v)
|
vzero(float *v)
|
||||||
|
|||||||
Reference in New Issue
Block a user