Mercurial > hg > svgui
comparison layer/LayerFactory.cpp @ 1414:fa986b91d77f
Merge from branch fix-static-analysis
author | Chris Cannam |
---|---|
date | Wed, 09 Jan 2019 15:24:51 +0000 |
parents | c8a6fd3f9dff |
children | 62e908518c71 |
comparison
equal
deleted
inserted
replaced
1413:0930a27ebea2 | 1414:fa986b91d77f |
---|---|
369 } else if (layerType == Text) { | 369 } else if (layerType == Text) { |
370 return new TextModel(baseModel->getSampleRate(), 1, true); | 370 return new TextModel(baseModel->getSampleRate(), 1, true); |
371 } else if (layerType == Image) { | 371 } else if (layerType == Image) { |
372 return new ImageModel(baseModel->getSampleRate(), 1, true); | 372 return new ImageModel(baseModel->getSampleRate(), 1, true); |
373 } else { | 373 } else { |
374 return 0; | 374 return nullptr; |
375 } | 375 } |
376 } | 376 } |
377 | 377 |
378 int | 378 int |
379 LayerFactory::getChannel(Layer *layer) | 379 LayerFactory::getChannel(Layer *layer) |
405 } | 405 } |
406 | 406 |
407 Layer * | 407 Layer * |
408 LayerFactory::createLayer(LayerType type) | 408 LayerFactory::createLayer(LayerType type) |
409 { | 409 { |
410 Layer *layer = 0; | 410 Layer *layer = nullptr; |
411 | 411 |
412 switch (type) { | 412 switch (type) { |
413 | 413 |
414 case Waveform: | 414 case Waveform: |
415 layer = new WaveformLayer; | 415 layer = new WaveformLayer; |