Mercurial > hg > svapp
comparison framework/Document.cpp @ 719:b8bf2900a478
Avoid a compiler warning
author | Chris Cannam |
---|---|
date | Thu, 21 Nov 2019 14:28:47 +0000 |
parents | 7669c8cc869d |
children | 36772d79cf44 |
comparison
equal
deleted
inserted
replaced
718:464fed3096f5 | 719:b8bf2900a478 |
---|---|
775 // we know no other layer is using one, we should release it. If | 775 // we know no other layer is using one, we should release it. If |
776 // we happen to release one that is being used, the ModelById | 776 // we happen to release one that is being used, the ModelById |
777 // borrowed-pointer mechanism will at least prevent memory errors, | 777 // borrowed-pointer mechanism will at least prevent memory errors, |
778 // although the other code will have to stop whatever it's doing. | 778 // although the other code will have to stop whatever it's doing. |
779 | 779 |
780 // "warning: expression with side effects will be evaluated despite | |
781 // being used as an operand to 'typeid'" | |
782 #ifdef __clang__ | |
783 #pragma clang diagnostic ignored "-Wpotentially-evaluated-expression" | |
784 #endif | |
785 | |
780 if (auto model = ModelById::get(modelId)) { | 786 if (auto model = ModelById::get(modelId)) { |
781 SVCERR << "Document::releaseModel(" << modelId << "), name " | 787 SVCERR << "Document::releaseModel(" << modelId << "), name " |
782 << model->objectName() << ", type " | 788 << model->objectName() << ", type " |
783 << typeid(*model.get()).name() << endl; | 789 << typeid(*model.get()).name() << endl; |
784 } else { | 790 } else { |