treacherousfiend / lightmaputil Goto Github PK
View Code? Open in Web Editor NEWA simple command line utility to tell you if your lightmaps are too high res (and maybe more soon?)
License: Creative Commons Zero v1.0 Universal
A simple command line utility to tell you if your lightmaps are too high res (and maybe more soon?)
License: Creative Commons Zero v1.0 Universal
LightmapUtil.cpp
can't build due to an error in checkSampleNeighbors()
Using gcc 13.2.1
[ 50%] Building CXX object CMakeFiles/lightmaputil.dir/src/LightmapUtil.cpp.o
In file included from /home/micwoj92/LightmapUtil/src/LightmapUtil.h:4,
from /home/micwoj92/LightmapUtil/src/LightmapUtil.cpp:10:
/home/micwoj92/LightmapUtil/src/bsplib.h: In member function ‘dvertex_t& dvertex_t::operator+(dvertex_t)’:
/home/micwoj92/LightmapUtil/src/bsplib.h:367:24: warning: reference to local variable ‘rhs’ returned [-Wreturn-local-addr]
367 | return rhs;
| ^~~
/home/micwoj92/LightmapUtil/src/bsplib.h:362:40: note: declared here
362 | dvertex_t& operator+(dvertex_t rhs)
| ~~~~~~~~~~^~~
/home/micwoj92/LightmapUtil/src/bsplib.h: In member function ‘dvertex_t& dvertex_t::operator-(dvertex_t)’:
/home/micwoj92/LightmapUtil/src/bsplib.h:374:24: warning: reference to local variable ‘rhs’ returned [-Wreturn-local-addr]
374 | return rhs;
| ^~~
/home/micwoj92/LightmapUtil/src/bsplib.h:369:40: note: declared here
369 | dvertex_t& operator-(dvertex_t rhs)
| ~~~~~~~~~~^~~
Using clang 16.0.6 this code also generates warning:
[ 50%] Building CXX object CMakeFiles/lightmaputil.dir/src/LightmapUtil.cpp.o
In file included from /home/micwoj92/LightmapUtil/src/LightmapUtil.cpp:10:
In file included from /home/micwoj92/LightmapUtil/src/LightmapUtil.h:4:
/home/micwoj92/LightmapUtil/src/bsplib.h:367:10: warning: reference to stack memory associated with parameter 'rhs' returned [-Wreturn-stack-address]
return rhs;
^~~
/home/micwoj92/LightmapUtil/src/bsplib.h:374:10: warning: reference to stack memory associated with parameter 'rhs' returned [-Wreturn-stack-address]
return rhs;
^~~
2 warnings generated.
If the user omits the file extension when opening the program, it will fail to read it.
Forgot to actually make an issue post for this.
For some reason MSVC has a problem with us overloading a binary operator and as such fails to build.
in specific it hates this one and gives the error "binary '+': no operator found which takes a left-hand operand of type 'dvertex_t' (or there is no acceptable conversion)", even though our overloaded operator only accepts dvertex_t in both the left and right slots.
dvertex_t operator+(dvertex_t lhs, dvertex_t rhs)
{
return lhs += rhs;
}
It probably would hate the other operators too but this is the first one it sees so it is the one that errors.
#14 attempted to fix this, but it unfortunately still errors out, although it complains about += instead of +. Oddly, with that error it seems to complain inside our + operator instead of when the + operator is called.
This builds and works correctly on other compilers like Clang, and even VS's intellisense seems to understand it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.