code cleanup: remove redundant casts. quiet some qualifier warnings.

This commit is contained in:
Campbell Barton
2012-10-14 07:40:16 +00:00
parent 76e2706b30
commit 27e54f4d37
22 changed files with 46 additions and 45 deletions

View File

@@ -89,7 +89,7 @@ getNumDisplaySettings(
#else
/* We only have one X11 setting at the moment. */
GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");
numSettings = GHOST_TInt32(1);
numSettings = 1;
#endif
return GHOST_kSuccess;
@@ -160,7 +160,7 @@ getCurrentDisplaySetting(
/* According to the xf86vidmodegetallmodelines man page,
* "The first element of the array corresponds to the current video mode."
*/
return getDisplaySetting(display, GHOST_TInt32(0), setting);
return getDisplaySetting(display, 0, setting);
}

View File

@@ -1456,7 +1456,7 @@ void GHOST_SystemX11::getClipboard_xcout(XEvent evt,
/* check size and format of the property */
XGetWindowProperty(m_display, win, m_xclip_out, 0, 0, False,
AnyPropertyType, &pty_type, &pty_format,
&pty_items, &pty_size, (unsigned char **) &buffer);
&pty_items, &pty_size, &buffer);
if (pty_format != 8) {
/* property does not contain text, delete it
@@ -1484,7 +1484,7 @@ void GHOST_SystemX11::getClipboard_xcout(XEvent evt,
* text, we know the size. */
XGetWindowProperty(m_display, win, m_xclip_out, 0, (long) pty_size,
False, AnyPropertyType, &pty_type, &pty_format,
&pty_items, &pty_size, (unsigned char **) &buffer);
&pty_items, &pty_size, &buffer);
/* allocate memory to accommodate data in *txt */
if (*len == 0) {
@@ -1538,12 +1538,12 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
if (sseln == m_clipboard) {
sel_buf = (unsigned char *)malloc(strlen(txt_cut_buffer) + 1);
strcpy((char *)sel_buf, txt_cut_buffer);
return((GHOST_TUns8 *)sel_buf);
return sel_buf;
}
else {
sel_buf = (unsigned char *)malloc(strlen(txt_select_buffer) + 1);
strcpy((char *)sel_buf, txt_select_buffer);
return((GHOST_TUns8 *)sel_buf);
return sel_buf;
}
}
else if (owner == None)
@@ -1594,7 +1594,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
else
free(sel_buf);
return (GHOST_TUns8 *)tmp_data;
return tmp_data;
}
return(NULL);
}