@@ -85,6 +85,7 @@ FINFUNSLIB_EXPORT double finfuns_fv_due_end(double rate, uint32_t periods, doubl
8585 */
8686FINFUNSLIB_EXPORT double finfuns_fv_due_begin (double rate, uint32_t periods, double pmt, double present_value) noexcept ;
8787
88+ // NOLINTBEGIN
8889/* *
8990 * @brief Error codes for finfuns calculations
9091 *
@@ -113,7 +114,7 @@ typedef enum
113114 // Unexpected error
114115 FINFUNS_CODE_UNEXPECTED_ERROR = 999 ,
115116} FinFunsCode;
116-
117+ // NOLINTEND
117118
118119/* *
119120 * @brief Calculates Internal Rate of Return (IRR)
@@ -130,8 +131,9 @@ typedef enum
130131 * @warning The first cashflow should typically be negative (initial investment).
131132 */
132133FINFUNSLIB_EXPORT [[nodiscard]] FinFunsCode
133- finfuns_irr (const double * cashflows, int num_cashflows, double guess, double * out_result) noexcept ;
134+ finfuns_irr (const double * cashflows, unsigned num_cashflows, double guess, double * out_result) noexcept ;
134135
136+ // NOLINTBEGIN
135137/* *
136138 * @brief Time period indexing convention
137139 */
@@ -140,6 +142,7 @@ typedef enum
140142 FINFUNS_ZERO_BASED, // /< First period is index 0 (standard financial convention)
141143 FINFUNS_ONE_BASED // /< First period is index 1 (alternative convention)
142144} FinFunsIndexMode;
145+ // NOLINTEND
143146
144147/* *
145148 * @brief Calculate Net Present Value (NPV)
@@ -156,9 +159,10 @@ typedef enum
156159 * For OneBased mode, all cashflows are discounted (first occurs at t=1).
157160 */
158161FINFUNSLIB_EXPORT [[nodiscard]] FinFunsCode
159- finfuns_npv (FinFunsIndexMode mode, double rate, const double * cashflows, int num_cashflows, double * out_result) noexcept ;
162+ finfuns_npv (FinFunsIndexMode mode, double rate, const double * cashflows, unsigned num_cashflows, double * out_result) noexcept ;
160163
161164
165+ // NOLINTBEGIN
162166/* *
163167 * @brief Day count conventions
164168 */
@@ -167,6 +171,7 @@ typedef enum
167171 FINFUNS_ACT_365F, // /< Actual days / 365-day year (ISDA)
168172 FINFUNS_ACT_365_25, // /< Actual days / 365.25-day year (ISDA)
169173} FinFunsDayCount;
174+ // NOLINTEND
170175
171176/* *
172177 * @brief Calculates XNPV with dates as days since epoch (1970-01-01). Could also jus use relative days if the given date convention supports it.
@@ -183,7 +188,12 @@ typedef enum
183188 * @warning First cashflow (typically the investment) should be negative
184189 */
185190FINFUNSLIB_EXPORT [[nodiscard]] FinFunsCode finfuns_xnpv (
186- FinFunsDayCount day_count, double rate, const double * cashflows, const int * dates, int num_cashflows, double * out_result) noexcept ;
191+ FinFunsDayCount day_count,
192+ double rate,
193+ const double * cashflows,
194+ const int * dates,
195+ unsigned num_cashflows,
196+ double * out_result) noexcept ;
187197
188198/* *
189199 * @brief Calculates XIRR with dates as days since epoch (1970-01-01). Could also jus use relative days if the given date convention supports it.
@@ -201,7 +211,12 @@ FINFUNSLIB_EXPORT [[nodiscard]] FinFunsCode finfuns_xnpv(
201211 * @warning First cashflow should typically be negative (initial investment)
202212 */
203213FINFUNSLIB_EXPORT [[nodiscard]] FinFunsCode finfuns_xirr (
204- FinFunsDayCount day_count, const double * cashflows, const int * dates, int num_cashflows, double guess, double * out_result) noexcept ;
214+ FinFunsDayCount day_count,
215+ const double * cashflows,
216+ const int * dates,
217+ unsigned num_cashflows,
218+ double guess,
219+ double * out_result) noexcept ;
205220
206221
207222#ifdef __cplusplus
0 commit comments