mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +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)
|
||||
{
|
||||
FUNCTION_TEST_VOID();
|
||||
FUNCTION_TEST_RETURN(strLstNewParam(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));
|
||||
FUNCTION_TEST_RETURN((StringList *)lstNewP(sizeof(String *), .comparator = lstComparatorStr));
|
||||
}
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
@ -18,7 +18,6 @@ typedef struct StringList StringList;
|
||||
Constructors
|
||||
***********************************************************************************************************************************/
|
||||
StringList *strLstNew(void);
|
||||
StringList *strLstNewParam(ListComparator *comparator);
|
||||
|
||||
// Split a string into a string list based on a delimiter
|
||||
StringList *strLstNewSplit(const String *string, const String *delimiter);
|
||||
|
@ -2052,7 +2052,7 @@ testRun(void)
|
||||
//--------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_TITLE("archiveId comparator sorting");
|
||||
|
||||
StringList *list = strLstNewParam(archiveIdComparator);
|
||||
StringList *list = strLstComparatorSet(strLstNew(), archiveIdComparator);
|
||||
|
||||
strLstAddZ(list, "10-4");
|
||||
strLstAddZ(list, "11-10");
|
||||
|
Loading…
Reference in New Issue
Block a user