Browse Source

Use std::string::data() instead of std::string::c_str().

Meaningless changes on meaningless day.
pull/38/head
Vladimír Vondruš 13 years ago
parent
commit
34954a54e3
  1. 8
      src/AbstractShaderProgram.cpp
  2. 4
      src/DebugMarker.cpp

8
src/AbstractShaderProgram.cpp

@ -298,15 +298,15 @@ void AbstractShaderProgram::attachShader(Shader& shader) {
} }
void AbstractShaderProgram::bindAttributeLocation(UnsignedInt location, const std::string& name) { void AbstractShaderProgram::bindAttributeLocation(UnsignedInt location, const std::string& name) {
glBindAttribLocation(_id, location, name.c_str()); glBindAttribLocation(_id, location, name.data());
} }
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void AbstractShaderProgram::bindFragmentDataLocation(UnsignedInt location, const std::string& name) { void AbstractShaderProgram::bindFragmentDataLocation(UnsignedInt location, const std::string& name) {
glBindFragDataLocation(_id, location, name.c_str()); glBindFragDataLocation(_id, location, name.data());
} }
void AbstractShaderProgram::bindFragmentDataLocationIndexed(UnsignedInt location, UnsignedInt index, const std::string& name) { void AbstractShaderProgram::bindFragmentDataLocationIndexed(UnsignedInt location, UnsignedInt index, const std::string& name) {
glBindFragDataLocationIndexed(_id, location, index, name.c_str()); glBindFragDataLocationIndexed(_id, location, index, name.data());
} }
#endif #endif
@ -347,7 +347,7 @@ bool AbstractShaderProgram::link() {
} }
Int AbstractShaderProgram::uniformLocation(const std::string& name) { Int AbstractShaderProgram::uniformLocation(const std::string& name) {
GLint location = glGetUniformLocation(_id, name.c_str()); GLint location = glGetUniformLocation(_id, name.data());
if(location == -1) if(location == -1)
Warning() << "AbstractShaderProgram: location of uniform \'" + name + "\' cannot be retrieved!"; Warning() << "AbstractShaderProgram: location of uniform \'" + name + "\' cannot be retrieved!";
return location; return location;

4
src/DebugMarker.cpp

@ -51,10 +51,10 @@ void DebugMarker::markImplementationDefault(const std::string&) {}
void DebugMarker::markImplementationDebugger(const std::string& string) { void DebugMarker::markImplementationDebugger(const std::string& string) {
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
glStringMarkerGREMEDY(string.length(), string.c_str()); glStringMarkerGREMEDY(string.length(), string.data());
#else #else
#if 0 #if 0
glInsertEventMarkerEXT(string.length(), string.c_str()); glInsertEventMarkerEXT(string.length(), string.data());
#else #else
static_cast<void>(string); static_cast<void>(string);
#endif #endif

Loading…
Cancel
Save