Giang-Chaebol
  • Joined on 2024-04-21
Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 12:28:46 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

However, I still think it might be better to fix the line for cleaner code. Explicit type conversion prevents data loss and increases clarity.

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 12:19:16 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

Ok the error from your CMakeLists.txt appeared to stop me from building it. I upgraded my g++ to 11 and rebuilt it. Now it can compile fine without giving me any errors.

Btw, your message…

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 09:55:58 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

@Giang-Chaebol building shouldn't even have started since CMake checks GCC is at least 11.0.0, did you modify CMakeLists.txt in order to get Blender building?

What does gcc --version

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 09:54:35 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

@Giang-Chaebol building shouldn't even have started since CMake checks GCC is at least 11.0.0, did you modify CMakeLists.txt in order to get Blender building?

What does gcc --version

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 09:46:31 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

In the build output there is the message "unrecognized command line option" this is a hint that there is something wrong with the build as CMake is meant to detect this flag and only pass it in…

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 09:45:42 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

@Giang-Chaebol it's strange that your running into these errors as I don't get them with recent Linux/macOS build environments, what compiler version are you using?

(multiverse)…
Giang-Chaebol commented on pull request blender/blender#120879 2024-04-26 00:19:01 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

It still gives me the error, see the video.

Sorry, but I'm not seeing the error in that video. Although you have blf_glyph.cc loaded, the capture is showing terminal messages to do with…

Giang-Chaebol commented on pull request blender/blender#120879 2024-04-25 23:10:18 +02:00
Fix error: conversion from ‘int’ to ‘uchar’ {aka ‘unsigned char’}

Hello, and thanks for looking at this. My compiler is not giving me this same warning, so I am a bit blind here.

This warning is about an assignment to uchar from a function that returns…

Giang-Chaebol commented on pull request blender/blender#120884 2024-04-22 20:14:27 +02:00
Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’

What is your compiler version? Does it match the requirements here? https://developer.blender.org/docs/handbook/building_blender/#compiler-versions

$ gcc --version gcc (Ubuntu 11.4.0-2ubuntu1…

Giang-Chaebol commented on pull request blender/blender#120884 2024-04-22 13:27:09 +02:00
Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’
  • Could you combine the other PRs with similar changes into this one? Splitting the change in three doesn't really help.
  • This is missing clang format. Please read https://developer.blender.o
Giang-Chaebol pushed to FixConversionEditmeshBvh at Giang-Chaebol/blender 2024-04-22 13:24:16 +02:00
0e17ab3155 Format clang
Giang-Chaebol pushed to FixConversionEditmeshBvh at Giang-Chaebol/blender 2024-04-22 12:58:37 +02:00
f786904ca9 Merge branch 'FixConversionBvhutils' into FixConversionEditmeshBvh
7f90d229aa Merge branch 'FixConversionEditmeshTangent' into FixConversionEditmeshBvh
b302b40e07 Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’
6aff7dc4fa Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’
Compare 4 commits »
Giang-Chaebol commented on pull request blender/blender#120873 2024-04-22 12:48:20 +02:00
Fix conversions

Please be consistent, should I target these PRs at main? If so, do I need to split the PR into changes of each file?

Giang-Chaebol commented on pull request blender/blender#120877 2024-04-22 10:30:20 +02:00
Fix error: conversion from ‘int’ to ‘int16_t’

Thanks for the fix. Please use functional style type casts for integer types, as mentioned in the style guide.

Done.

Giang-Chaebol pushed to FixConversionIndexMask at Giang-Chaebol/blender 2024-04-22 10:29:29 +02:00
faa9a632f0 Change to functional-style cast
Giang-Chaebol commented on pull request blender/blender#120881 2024-04-21 16:11:35 +02:00
Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’

Nope, still the same, with or without const in <>

blender/source/blender/blenkernel/intern/bvhutils.cc:962:83: error: invalid static_cast from type ‘BMLoop* (*)[3]’ to type ‘const…
Giang-Chaebol commented on pull request blender/blender#120881 2024-04-21 15:34:56 +02:00
Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’

No, it will raise the same error invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’, because em->looptris is not a const

Giang-Chaebol closed pull request blender/blender#120873 2024-04-21 15:32:02 +02:00
Fix conversions
Giang-Chaebol commented on pull request blender/blender#120873 2024-04-21 15:32:00 +02:00
Fix conversions
Giang-Chaebol created pull request blender/blender#120884 2024-04-21 15:30:11 +02:00
Fix error: invalid const_cast from type ‘BMLoop* (*)[3]’ to type ‘const BMLoop* (*)[3]’