1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-15 05:25:53 +01:00

WINGs: Added 'const' attribute to functions in wbrowser, wcolorpanel, wfilepanel and wfontpanel

This makes both the API and local function const-correct on their
input parameters.
This commit is contained in:
Christophe CURIS
2013-05-09 17:34:03 +02:00
committed by Carlos R. Mafra
parent c89e8df33f
commit a1119f8dd3
5 changed files with 30 additions and 30 deletions

View File

@@ -75,7 +75,7 @@ static void loadColumn(WMBrowser * bPtr, int column);
static void removeColumn(WMBrowser * bPtr, int column);
static char *createTruncatedString(WMFont * font, char *text, int *textLen, int width);
static char *createTruncatedString(WMFont * font, const char *text, int *textLen, int width);
static void willResizeBrowser(W_ViewDelegate *, WMView *, unsigned int *, unsigned int *);
@@ -220,7 +220,7 @@ int WMGetBrowserNumberOfColumns(WMBrowser * bPtr)
return bPtr->usedColumnCount;
}
void WMSetBrowserPathSeparator(WMBrowser * bPtr, char *separator)
void WMSetBrowserPathSeparator(WMBrowser * bPtr, const char *separator)
{
if (bPtr->pathSeparator)
wfree(bPtr->pathSeparator);
@@ -350,7 +350,7 @@ int WMGetBrowserSelectedRowInColumn(WMBrowser * bPtr, int column)
}
}
void WMSetBrowserColumnTitle(WMBrowser * bPtr, int column, char *title)
void WMSetBrowserColumnTitle(WMBrowser * bPtr, int column, const char *title)
{
assert(column >= 0);
assert(column < bPtr->usedColumnCount);
@@ -414,7 +414,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser * bPtr, int column, WMCompareData
WMSortListItemsWithComparer(bPtr->columns[column], func);
}
WMListItem *WMInsertBrowserItem(WMBrowser * bPtr, int column, int row, char *text, Bool isBranch)
WMListItem *WMInsertBrowserItem(WMBrowser * bPtr, int column, int row, const char *text, Bool isBranch)
{
WMListItem *item;
@@ -1116,7 +1116,7 @@ static void destroyBrowser(WMBrowser * bPtr)
wfree(bPtr);
}
static char *createTruncatedString(WMFont * font, char *text, int *textLen, int width)
static char *createTruncatedString(WMFont * font, const char *text, int *textLen, int width)
{
size_t slen;
int dLen;