Mercurial > hg > svgui
comparison layer/LayerFactory.cpp @ 1408:c8a6fd3f9dff fix-static-analysis
Use nullptr throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 14:33:54 +0000 |
parents | a34a2a25907c |
children | 62e908518c71 |
comparison
equal
deleted
inserted
replaced
1407:05d614f6e46d | 1408:c8a6fd3f9dff |
---|---|
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; |