constify coinmp some more

Change-Id: Ic16212bf1050dd5997699ce939b67e87d3531559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188325
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2025-07-25 22:16:59 +02:00
parent 069032433a
commit 1a43e98b14
2 changed files with 31 additions and 0 deletions
+1
View File
@@ -56,6 +56,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/clang-with-path.patch \
external/coinmp/odr.patch \
external/coinmp/const.patch.1 \
external/coinmp/const2.patch.1 \
))
# vim: set noet sw=4 ts=4:
+30
View File
@@ -0,0 +1,30 @@
diff -ur coinmp.org/Clp/src/ClpMessage.cpp coinmp/Clp/src/ClpMessage.cpp
--- coinmp.org/Clp/src/ClpMessage.cpp 2025-07-25 11:26:58.104048978 +0200
+++ coinmp/Clp/src/ClpMessage.cpp 2025-07-25 11:29:02.781194570 +0200
@@ -12,7 +12,7 @@
char detail;
const char * message;
} Clp_message;
-static Clp_message clp_us_english[] = {
+static const Clp_message clp_us_english[] = {
{CLP_SIMPLEX_FINISHED, 0, 1, "Optimal - objective value %g"},
{CLP_SIMPLEX_INFEASIBLE, 1, 1, "Primal infeasible - objective value %g"},
{CLP_SIMPLEX_UNBOUNDED, 2, 1, "Dual infeasible - objective value %g"},
@@ -116,7 +116,7 @@
{CLP_GENERAL_WARNING, 3006, 1, "%s"},
{CLP_DUMMY_END, 999999, 0, ""}
};
-static Clp_message uk_english[] = {
+static const Clp_message uk_english[] = {
{
CLP_SIMPLEX_FINISHED, 0, 1, "Optimal - objective value %g,\
okay CLP can solve some LPs but you really need Xpress from Dash Associates :-)"
@@ -130,7 +130,7 @@
language_ = language;
strcpy(source_, "Clp");
class_ = 1; //solver
- Clp_message * message = clp_us_english;
+ const Clp_message * message = clp_us_english;
while (message->internalNumber != CLP_DUMMY_END) {
CoinOneMessage oneMessage(message->externalNumber, message->detail,