[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] URGENT: toggle function definition is deleting my code!
|
Really, it's getting rid of it without ANY ERRORS - persistent across
restarts.
If you have nested namespaces it usually only puts the inner-most one in
the .cpp file, and you manually add the outer ones and then it is fine.
I'm used to that problem.
The only thing different that CDT hasn't been great with is this:
operator bool() const {
return isOkay();
}
It wasn't able to toggle that, other than that there's nothing weird or
different about this class.
Here's an example:
This is an in-class definition:
void setShaderSource() {
const char* code[1];
code[0] = source.getInternalC_str();
glShaderSource(shaderHandle,1,code,0);
}
I toggle it and it CORRECTLY changes to the "inline" one and appears
below the class.
I toggle it again to send it to the .cpp file and this happens:
void Shader::setShaderSource() {
const char* code[1];
code[0] = source.getInternalC_str();
}
Weird but not a huge problem, so here's an example where it removes
everything 'cept the first line.
In class definition:
bool getShaderHandle(GLenum shaderType) {
shaderHandle = glCreateShader(shaderType);
if(shaderHandle == GL_FALSE) {
error = (const char*) glewGetErrorString((GLenum)
glGetError());
return false;
}
return true;
}
It is correctly inlined, but then:
bool Shader::getShaderHandle(GLenum shaderType) {
return true;
}
Silently.
It's also doing this with things that contain no macros, I can't
understand it. It seems to only be with this one file (I REALLY HOPE) too.
What's causing it?
Alec