mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-03-03 14:52:21 +02:00
Remove unused constructor strLstNewParam().
This function is not used in the core code so remove it and update the test where it was used. There may eventually be a need for a strLstNewP() function but it doesn't seem worth the code churn until there is an actual requirement.
This commit is contained in:
parent
1783e0490a
commit
90ffde8881
@ -19,17 +19,7 @@ StringList *
|
|||||||
strLstNew(void)
|
strLstNew(void)
|
||||||
{
|
{
|
||||||
FUNCTION_TEST_VOID();
|
FUNCTION_TEST_VOID();
|
||||||
FUNCTION_TEST_RETURN(strLstNewParam(lstComparatorStr));
|
FUNCTION_TEST_RETURN((StringList *)lstNewP(sizeof(String *), .comparator = lstComparatorStr));
|
||||||
}
|
|
||||||
|
|
||||||
StringList *
|
|
||||||
strLstNewParam(ListComparator *comparator)
|
|
||||||
{
|
|
||||||
FUNCTION_TEST_BEGIN();
|
|
||||||
FUNCTION_TEST_PARAM(FUNCTIONP, comparator);
|
|
||||||
FUNCTION_TEST_END();
|
|
||||||
|
|
||||||
FUNCTION_TEST_RETURN((StringList *)lstNewP(sizeof(String *), .comparator = comparator));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************************************************************************
|
/***********************************************************************************************************************************
|
||||||
|
@ -18,7 +18,6 @@ typedef struct StringList StringList;
|
|||||||
Constructors
|
Constructors
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
StringList *strLstNew(void);
|
StringList *strLstNew(void);
|
||||||
StringList *strLstNewParam(ListComparator *comparator);
|
|
||||||
|
|
||||||
// Split a string into a string list based on a delimiter
|
// Split a string into a string list based on a delimiter
|
||||||
StringList *strLstNewSplit(const String *string, const String *delimiter);
|
StringList *strLstNewSplit(const String *string, const String *delimiter);
|
||||||
|
@ -2052,7 +2052,7 @@ testRun(void)
|
|||||||
//--------------------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------------------
|
||||||
TEST_TITLE("archiveId comparator sorting");
|
TEST_TITLE("archiveId comparator sorting");
|
||||||
|
|
||||||
StringList *list = strLstNewParam(archiveIdComparator);
|
StringList *list = strLstComparatorSet(strLstNew(), archiveIdComparator);
|
||||||
|
|
||||||
strLstAddZ(list, "10-4");
|
strLstAddZ(list, "10-4");
|
||||||
strLstAddZ(list, "11-10");
|
strLstAddZ(list, "11-10");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user