forked from qt-creator/qt-creator
Glsl: Avoid use of global object pool
Also, use the opportunity to re-organize and clean up a bit. Change-Id: I09d5635f48d98b450ffd1eb1a0e003a288cf6804 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -208,14 +208,14 @@ void GlslEditorWidget::updateDocumentNow()
|
||||
Scope *globalScope = new Namespace();
|
||||
doc->_globalScope = globalScope;
|
||||
const GlslEditorPlugin::InitFile *file = GlslEditorPlugin::shaderInit(variant);
|
||||
sem.translationUnit(file->ast, globalScope, file->engine);
|
||||
sem.translationUnit(file->ast(), globalScope, file->engine());
|
||||
if (variant & Lexer::Variant_VertexShader) {
|
||||
file = GlslEditorPlugin::vertexShaderInit(variant);
|
||||
sem.translationUnit(file->ast, globalScope, file->engine);
|
||||
sem.translationUnit(file->ast(), globalScope, file->engine());
|
||||
}
|
||||
if (variant & Lexer::Variant_FragmentShader) {
|
||||
file = GlslEditorPlugin::fragmentShaderInit(variant);
|
||||
sem.translationUnit(file->ast, globalScope, file->engine);
|
||||
sem.translationUnit(file->ast(), globalScope, file->engine());
|
||||
}
|
||||
sem.translationUnit(ast, globalScope, doc->_engine);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user