avoid type conversion warning size_t -> int
This commit is contained in:
parent
f3bbb27d4c
commit
73da8e1cf5
|
|
@ -698,8 +698,8 @@ int WIN_NewViewport(GRAPH *graph)
|
||||||
wtext = TMALLOC(wchar_t, 2 * strlen(graph->plotname) + 1);
|
wtext = TMALLOC(wchar_t, 2 * strlen(graph->plotname) + 1);
|
||||||
wtext2 = TMALLOC(wchar_t, 2 * strlen(WindowName) + 1);
|
wtext2 = TMALLOC(wchar_t, 2 * strlen(WindowName) + 1);
|
||||||
/* translate UTF-8 to UTF-16 */
|
/* translate UTF-8 to UTF-16 */
|
||||||
MultiByteToWideChar(CP_UTF8, 0, graph->plotname, -1, wtext, 2 * strlen(graph->plotname) + 1);
|
MultiByteToWideChar(CP_UTF8, 0, graph->plotname, -1, wtext, 2 * (int)strlen(graph->plotname) + 1);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, WindowName, -1, wtext2, 2 * strlen(WindowName) + 1);
|
MultiByteToWideChar(CP_UTF8, 0, WindowName, -1, wtext2, 2 * (int)strlen(WindowName) + 1);
|
||||||
window = CreateWindowW(wtext2, wtext, WS_OVERLAPPEDWINDOW,
|
window = CreateWindowW(wtext2, wtext, WS_OVERLAPPEDWINDOW,
|
||||||
0, 0, WinLineWidth, i * 2 - 22, NULL, NULL, hInst, NULL);
|
0, 0, WinLineWidth, i * 2 - 22, NULL, NULL, hInst, NULL);
|
||||||
tfree(wtext);
|
tfree(wtext);
|
||||||
|
|
@ -1045,7 +1045,7 @@ int WIN_Text(char *text, int x, int y, int angle)
|
||||||
#else
|
#else
|
||||||
wchar_t *wtext;
|
wchar_t *wtext;
|
||||||
wtext = TMALLOC(wchar_t, 2 * strlen(text) + 1);
|
wtext = TMALLOC(wchar_t, 2 * strlen(text) + 1);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, text, -1, wtext, 2 * strlen(text) + 1);
|
MultiByteToWideChar(CP_UTF8, 0, text, -1, wtext, 2 * (int)strlen(text) + 1);
|
||||||
TextOutW(wd->hDC, x, wd->Area.bottom - y - currentgraph->fontheight, wtext, 2 * (int)strlen(text) + 1);
|
TextOutW(wd->hDC, x, wd->Area.bottom - y - currentgraph->fontheight, wtext, 2 * (int)strlen(text) + 1);
|
||||||
tfree(wtext);
|
tfree(wtext);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ int WPRINT_NewViewport(GRAPH * graph)
|
||||||
#else
|
#else
|
||||||
wchar_t* wtext;
|
wchar_t* wtext;
|
||||||
wtext = TMALLOC(wchar_t, 2 * strlen(graph->plotname) + 1);
|
wtext = TMALLOC(wchar_t, 2 * strlen(graph->plotname) + 1);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, graph->plotname, -1, wtext, 2 * strlen(graph->plotname) + 1);
|
MultiByteToWideChar(CP_UTF8, 0, graph->plotname, -1, wtext, 2 * (int)strlen(graph->plotname) + 1);
|
||||||
TextOutW(PrinterDC, PrinterWidth - graph->fontwidth, 1, wtext, 2 * (int)strlen(graph->plotname) + 1);
|
TextOutW(PrinterDC, PrinterWidth - graph->fontwidth, 1, wtext, 2 * (int)strlen(graph->plotname) + 1);
|
||||||
tfree(wtext);
|
tfree(wtext);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -433,7 +433,7 @@ int WPRINT_Text(char * text, int x, int y, int degrees)
|
||||||
#else
|
#else
|
||||||
wchar_t* wtext;
|
wchar_t* wtext;
|
||||||
wtext = TMALLOC(wchar_t, 2 * strlen(text) + 1);
|
wtext = TMALLOC(wchar_t, 2 * strlen(text) + 1);
|
||||||
MultiByteToWideChar(CP_UTF8, 0, text, -1, wtext, 2 * strlen(text) + 1);
|
MultiByteToWideChar(CP_UTF8, 0, text, -1, wtext, 2 * (int)strlen(text) + 1);
|
||||||
TextOutW(PrinterDC, x, PrinterHeight - y - currentgraph->fontheight, wtext, 2 * (int)strlen(text) + 1);
|
TextOutW(PrinterDC, x, PrinterHeight - y - currentgraph->fontheight, wtext, 2 * (int)strlen(text) + 1);
|
||||||
tfree(wtext);
|
tfree(wtext);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue