codemaker/source/netmaker/netproduce.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 15492ec2d25db324ce60d5994563eb86bbbf992f
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Sun Sep 29 17:20:12 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Sun Sep 29 19:05:47 2024 +0200

    Add "f" suffix to literals of type float
    
    ...to avoid
    
    > error CS0266: Cannot implicitly convert type 'double' to 'float'. An 
explicit conversion exists (are you missing a cast?)
    
    (as would e.g. happen if offapi/org/libreoffice/embindtest/Constants.idl 
were
    included in regular builds)
    
    Change-Id: I6a4d8b151755edd3a8b03d73e2bb546cf1d19e7d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174200
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>

diff --git a/codemaker/source/netmaker/netproduce.cxx 
b/codemaker/source/netmaker/netproduce.cxx
index ab3495b9e641..b11569c2130b 100644
--- a/codemaker/source/netmaker/netproduce.cxx
+++ b/codemaker/source/netmaker/netproduce.cxx
@@ -881,7 +881,7 @@ void NetProducer::produceConstantGroup(std::string_view 
name,
                 break;
             case unoidl::ConstantValue::TYPE_FLOAT:
                 type = "float"_ostr;
-                value = OString::number(member.value.floatValue);
+                value = OString::number(member.value.floatValue) + "f";
                 break;
             case unoidl::ConstantValue::TYPE_DOUBLE:
                 type = "double"_ostr;

Reply via email to