{"id":329925,"date":"2022-02-21T15:00:14","date_gmt":"2022-02-21T15:00:14","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=329925"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=329925","title":{"rendered":"<span>MuditaOS: \u0417\u0430\u0437\u0432\u043e\u043d\u0438\u0442 \u043b\u0438 \u0432\u0430\u0448 \u0431\u0443\u0434\u0438\u043b\u044c\u043d\u0438\u043a? \u0427\u0430\u0441\u0442\u044c 2<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b MuditaOS. \u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9a1\/772\/f52\/9a1772f523bc3304fa02375809f2d724.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9a1\/772\/f52\/9a1772f523bc3304fa02375809f2d724.png\"\/><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0441\u0430\u0439\u0442\u043e\u0432, \u0433\u0434\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0901\/\">\u0422\u043e\u043f-10 C \u0438 \u0421++ \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 PVS-Studio \u0432 2021 \u0433\u043e\u0434\u0443<\/a>, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<blockquote>\n<p>\u041a\u0430\u043a \u0443 PVS-Studio \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0421++? \u0423\u043c\u0435\u0435\u0442 \u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043a\u043e\u0432\u0430\u0440\u0441\u0442\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0421++?<\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043c\u0435\u043d\u044f \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430\u043c. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u0438\u0437 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u043d\u0435 \u0437\u0440\u044f. \u041f\u0440\u0430\u0432\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0434\u0430\u0441\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f, \u0434\u0430 \u043e\u043d\u043e \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e, \u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PVS-Studio \u0432 \u043f\u0430\u0440\u0435 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0436\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438. \u0421\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432\u044b\u0432\u043e\u0434 \u0438 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0432 \u043c\u0435\u0441\u0442\u0430\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439. \u041f\u0440\u0438 \u0438\u0445 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0448\u0438\u0440\u0435 \u0438 \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043a\u0430\u043a \u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0435 \u0432 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044f \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <a href=\"https:\/\/github.com\/mudita\/MuditaOS\/tree\/8cc1f779db7824a665240c5a89f1590a5831502c\">8cc1f77<\/a>. \u0418\u0442\u0430\u043a, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u044f\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438!<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/h3>\n<h4>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;fileIndexerAudioPaths&#8217; to the &#8216;std::move&#8217; function disables move semantics. BellHybridMain.cpp 77<\/p>\n<pre><code class=\"cpp\">int main() {   const std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.emplace_back(sys::CreatorFor&lt;     service::ServiceFileIndexer>(std::move(fileIndexerAudioPaths)));   .... } <\/code><\/pre>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0432\u044b\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0435 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0897\/\">PVS-Studio 7.16<\/a>. \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e <em>std::move<\/em> \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442: \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0432\u0435\u0434\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>std::move<\/em> \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f. \u041e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a \u0442\u0438\u043f\u0443 <em>T&amp;&amp;<\/em> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <em>static_cast<\/em>. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u044b\u0437\u043e\u0432 <em>std::move<\/em> \u2013 \u044d\u0442\u043e <strong>\u0437\u0430\u043f\u0440\u043e\u0441<\/strong> \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u043f\u0440\u044f\u043c\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;<a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/6514\/\">\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/a>&#171;.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e, \u0443\u0431\u0440\u0430\u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">int main() {   std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.push_back(sys::CreatorFor&lt;              service::ServiceFileIndexer>(std::move(fileIndexerAudioPaths)));   .... } <\/code><\/pre>\n<p>\u0418\u043b\u0438, \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430, \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <em>std::move<\/em>:<\/p>\n<pre><code class=\"cpp\">int main() {   const std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.push_back(sys::CreatorFor&lt;                       service::ServiceFileIndexer>(fileIndexerAudioPaths));   .... } <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>emplace_back<\/em> \u0431\u044b\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u043d\u0430 <em>push_back<\/em>. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043f\u0440\u043e\u0441\u0442\u0430. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430: <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/container\/vector\/emplace_back\"><em>emplace<\/em>_<em>back<\/em><\/a> &#8212; \u044d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>std::vector<\/em>. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0451 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430: <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/container\/vector\/push_back\"><em>push_back<\/em><\/a> &#8212; \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>std::vector<\/em>.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u0436\u0435 <em>\u043e\u0441\u043e\u0431\u0430\u044f \u0443\u043b\u0438\u0447\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f<\/em> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>emplace_back<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435? \u0410 \u043c\u0430\u0433\u0438\u0438 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0443 \u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/quuxplusone.github.io\/blog\/2021\/03\/03\/push-back-emplace-back\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 MuditaOS \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>. \u042d\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438 \u043e\u043d\u043e \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;text&#8217; to the &#8216;std::move&#8217; function disables move semantics. OptionBellMenu.hpp 30<\/p>\n<pre><code class=\"cpp\">class OptionBellMenu { public:   OptionBellMenu(const UTF8 &amp;text, ....)     : text(std::move(text))     , ....   {      }   .... private:   UTF8 text;   .... } <\/code><\/pre>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;blocks&#8217; to the &#8216;std::move&#8217; function disables move semantics. TextDocument.cpp 13<\/p>\n<pre><code class=\"cpp\">class TextDocument {   ....   std::list&lt;TextBlock> blocks;   .... } .... TextDocument::TextDocument(const std::list&lt;TextBlock> &amp;blocks)    : blocks(std::move(blocks)) {    } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0445\u043e\u0436 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0432\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f. \u0412 \u043e\u0431\u0449\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 20 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0439:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;snoozed&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. AlarmPresenter.cpp 27<\/p>\n<pre><code class=\"cpp\">void AlarmPopupContract::AlarmModel::setSnoozed(   std::vector&lt;SingleEventRecord> snoozed) {   this->snoozedRecord = snoozed; } <\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043a\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0451 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0443\u0431\u0440\u0430\u0432 \u043e\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>std::move<\/em>:<\/p>\n<pre><code class=\"cpp\">void AlarmPopupContract::AlarmModel::setSnoozed(   std::vector&lt;SingleEventRecord> snoozed) {   this->snoozedRecord = std::move(snoozed); } <\/code><\/pre>\n<p>\u0412\u0441\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 40 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;result->snoozedAlarms&#8217; to the &#8216;std::move&#8217; function disables move semantics. ActiveNotificationsModel.cpp 213<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;scheme&#8217; to the &#8216;std::move&#8217; function disables move semantics. ColorTestWindow.cpp 79<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;text&#8217; to the &#8216;std::move&#8217; function disables move semantics. OptionsWidgetMaker.cpp 17<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;dayMonthText&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. CalendarData.hpp 51<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;newRange&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. SpinnerPolicies.hpp 83<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;newRange&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. SpinnerPolicies.hpp 290<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 std::optional<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;draft.value()&#8217; expression to &#8216;*draft&#8217;. SMSInputWidget.cpp 158<\/p>\n<pre><code class=\"cpp\">class SMSInputWidget : public ListItem {   ....   std::optional&lt;SMSRecord> draft;   .... }  ....  void SMSInputWidget::updateDraftMessage(....) {   ....   if (draft.has_value())    {     app->updateDraft(draft.value(), inputText);   }   .... } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <em>has_value<\/em> \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>draft<\/em>, \u0442\u0438\u043f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <em>std::optional<\/em>, \u0442\u043e\u0447\u043d\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>value()<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u043e\u043d\u043e, \u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c <em>*<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0438\u043c\u0435\u044e\u0449\u0435\u0435\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b <a href=\"https:\/\/godbolt.org\/z\/We6s5q5h1\">\u043d\u0435\u043f\u043b\u043e\u0445\u043e<\/a> \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u0414\u0430, \u044d\u0442\u0443 \u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0437\u0432\u0430\u0442\u044c <em>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441 \u0446\u0435\u043b\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432<\/em>. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u0438\u043d\u043b\u0430\u0439\u043d\u0438\u043d\u0433) \u0438\u043b\u0438 \u0436\u0451\u0441\u0442\u043a\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0430 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435:<\/p>\n<pre><code class=\"cpp\">void SMSInputWidget::updateDraftMessage(....) {   ....   if (draft.has_value())    {     app->updateDraft(*draft, inputText);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">void ThreadItem::setContactName(std::optional&lt;long int> numberImportance) {   ....   if (numberImportance.has_value())    {     displayNumberImportance(numberImportance.value());   }   .... } <\/code><\/pre>\n<p>\u041e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">void ThreadItem::setContactName(std::optional&lt;long int> numberImportance) {   ....   if (numberImportance.has_value())    {     displayNumberImportance(*numberImportance);   }   .... } <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u0435\u0441\u0442\u044c \u043c\u0438\u043d\u0443\u0441: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>*<\/em> \u0438 \u043d\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043b\u044e\u0434\u0435\u0439, \u0441\u0447\u0438\u0442\u0430\u044e\u0449\u0438\u0445, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0437 \u0438\u0445 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/manual\/0017\/\">\u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/a>.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>, \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 (\u0432\u0441\u0435\u0433\u043e 66). \u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u0431\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;lastSms.value()&#8217; expression to &#8216;*lastSms&#8217;. NewMessage.cpp 358<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;currentFileToken.value()&#8217; expression to &#8216;*currentFileToken&#8217;. SongsPresenter.cpp 69<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;returnedContact.value()&#8217; expression to &#8216;*returnedContact&#8217;. PhonebookNewContact.cpp 171<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;activeDevice.value()&#8217; expression to &#8216;*activeDevice&#8217;. BluetoothSettingsModel.cpp 94<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;selectedDevice.value()&#8217; expression to &#8216;*selectedDevice&#8217;. AllDevicesWindow.cpp 75<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;blockSizeConstraint.value()&#8217; expression to &#8216;*blockSizeConstraint&#8217;. StreamFactory.cpp 72<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b STL<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> Maximum size of the &#8216;actions&#8217; vector is known at compile time. Consider pre-allocating it by calling actions.reserve(3). BellAlarmHandler.cpp<\/p>\n<pre><code class=\"cpp\">auto BellAlarmClockHandler::getActions(sys::Service *service) -> Actions {   Actions actions;   actions.emplace_back(....);   actions.emplace_back(....);   actions.emplace_back(....);   return actions; } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0441 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>reserve<\/em> \u043f\u0435\u0440\u0435\u0434 \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0432\u044b\u0437\u043e\u0432\u044b <em>emplace_back<\/em> \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a \u0440\u0435\u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435 \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043d\u043e\u0432\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u0438. \u0410 \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435, \u043d\u0435 \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a <em>noexcept<\/em>, \u0442\u043e \u0432\u0435\u043a\u0442\u043e\u0440 \u0431\u0443\u0434\u0435\u0442 <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/utility\/move_if_noexcept#Notes\">\u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c, \u0430 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b<\/a>. \u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043c\u043e\u0436\u043d\u043e, \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u044b\u0434\u0435\u043b\u0438\u0432 \u0431\u0443\u0444\u0435\u0440 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">auto BellAlarmClockHandler::getActions(sys::Service *service) -> Actions {   Actions actions;   Actions.reserve(3);   actions.emplace_back(....);   actions.emplace_back(....);   actions.emplace_back(....);   return actions; } <\/code><\/pre>\n<p>\u041a\u0441\u0442\u0430\u0442\u0438, \u0430 \u0432\u044b \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u0442\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u044b\/\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u0430\u043a <em>noexcept<\/em>?<\/p>\n<p>\u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0434\u043b\u044f MuditaOS \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438. \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a>, \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0435\u0442\u0430\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438.<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u043e \u0435\u0441\u0442\u044c \u0435\u0441\u043b\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0443\u0447\u0442\u0451\u0442 \u0435\u0433\u043e \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430.<\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> Maximum size of the &#8216;ret&#8217; vector is known at compile time. Consider pre-allocating it by calling ret.reserve(8). Commands.cpp 11<\/p>\n<pre><code class=\"cpp\">std::vector&lt;AT> getCommadsSet(commadsSet set) {   std::vector&lt;AT> ret;    switch (set)    {     case commadsSet::modemInit:       ret.push_back(AT::URC_NOTIF_CHANNEL);       ret.push_back(AT::RI_PIN_AUTO_CALL);       ret.push_back(AT::RI_PIN_PULSE_SMS);       ret.push_back(AT::RI_PIN_PULSE_OTHER);       ret.push_back(AT::URC_DELAY_ON);       ret.push_back(AT::URC_UART1);       ret.push_back(AT::AT_PIN_READY_LOGIC);       ret.push_back(AT::CSQ_URC_ON);       break;     case commadsSet::simInit:       ret.push_back(AT::CALLER_NUMBER_PRESENTATION);       ret.push_back(AT::SMS_TEXT_FORMAT);       ret.push_back(AT::SMS_GSM);       ret.push_back(AT::CRC_ON);       break;     case commadsSet::smsInit:       ret.push_back(AT::SET_SMS_STORAGE);       ret.push_back(AT::SMS_TEXT_FORMAT);       ret.push_back(AT::SMS_GSM);       break;   }   return ret; } <\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u043f\u043e \u043a\u043e\u0434\u0443, \u0432 \u0441\u0430\u043c\u043e\u0439 \u0434\u043b\u0438\u043d\u043d\u043e\u0439 \u0438\u0437 \u0432\u0435\u0442\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>switch<\/em> \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043e <em>8<\/em> \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>push_back<\/em>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0432\u0438\u0434\u044f \u044d\u0442\u043e, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c <em>ret.reserve(8)<\/em>.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> Maximum size of the &#8216;data&#8217; vector is known at compile time. Consider pre-allocating it by calling data.reserve(3) ServiceCellular.cpp 1093<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> Maximum size of the &#8216;commandParts&#8217; vector is known at compile time. Consider pre-allocating it by calling commandParts.reserve(8) CallForwardingRequest.cpp 42<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v827\/\">V827<\/a> Maximum size of the &#8216;pathElements&#8217; vector is known at compile time. Consider pre-allocating it by calling pathElements.reserve(4) AudioCommon.cpp 51<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0438\u043d\u043d\u043e\u0432\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0435. \u041e\u043d\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u044d\u0432\u0440\u0438\u0441\u0442\u0438\u043a\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043d\u0430 \u0442\u0438\u043f\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442 \u0441 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u044d\u0442\u043e\u0433\u043e, \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0441\u0435\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0438\u0436\u0435. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u044d\u0442\u043e\u0439 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v826\/\">V826<\/a> Consider replacing the &#8216;dbFileExt&#8217; std::vector with std::array. The size is known at compile time. common.cpp 9<\/p>\n<pre><code class=\"cpp\">void RemoveDbFiles(const std::string &amp;dbName) {   std::vector&lt;std::string> dbFileExt = {\".db\", \".db-journal\", \".db-wal\"};   for (const auto &amp;ext : dbFileExt)    {     const auto dbPath = (std::filesystem::path{\"sys\/user\"} \/                           std::filesystem::path{dbName + ext});     if (std::filesystem::exists(dbPath))      {       std::filesystem::remove(dbPath.c_str());     }   } } <\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0440\u0438 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u043c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u0432\u043c\u0435\u0441\u0442\u043e <em>std::vector<\/em> \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>std::array<\/em>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c <em>static<\/em>, \u0447\u0442\u043e\u0431 \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0440\u0430\u0437.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0437 \u0432\u043d\u0443\u0442\u0440\u044c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u043a\u043b\u0430\u0434\u0443\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u044b, \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c <em>std::string<\/em> \u043d\u0430 <em>std::string_view<\/em>. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u0436\u0435 \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <em>filesystem<\/em>, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u0434 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 C++17 \u0438 <em>std::string_view<\/em> \u0432 \u043a\u043e\u0434\u043e\u0432\u043e\u0439 \u0431\u0430\u0437\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0425\u043c, \u0442\u0435\u043f\u0435\u0440\u044c \u0443 \u043d\u0430\u0441 \u043c\u0430\u0441\u0441\u0438\u0432 <em>std::string_view<\/em>, \u043e\u0431\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0443\u043c\u0435\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 compile-time. \u0417\u043d\u0430\u0447\u0438\u0442, \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c <em>constexpr<\/em>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">void RemoveDbFiles(const std::string &amp;dbName) {   using namespace std::literals;   static constexpr std::array dbFileExt =                                       {\".db\"sv, \".db-journal\"sv, \".db-wal\"sv};    for (auto ext : dbFileExt)   {     const auto dbPath = (std::filesystem::path{\"sys\/user\"} \/                         std::filesystem::path{dbName + std::string { ext }});     if (std::filesystem::exists(dbPath))      {       std::filesystem::remove(dbPath.c_str());     }   } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c GCC \u0434\u043b\u044f \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 <a href=\"https:\/\/godbolt.org\/z\/vrYzMbzGn\">Compiler Explorer<\/a>.<\/p>\n<p>\u0412\u043e\u043e\u0431\u0449\u0435, \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v826\/\">V826<\/a> \u043e\u0431\u0448\u0438\u0440\u043d\u0430 \u0438 \u043f\u043e\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0432\u043e\u0442 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v826\/\">V826<\/a> Consider replacing the &#8216;carriers&#8217; std::list with std::vector. Contiguous placement of elements in memory can be more efficient. SpecialInputModel.cpp 45<\/p>\n<pre><code class=\"cpp\">void SpecialInputModel::buildGrid(const std::vector&lt;char32_t> &amp;elements) {   while (....)    {     ....     std::list&lt;gui::Carrier> carriers;     for (....)      {       ....       carriers.push_back(....);       ....       carriers.push_back(....);     }     ....   }   ....   internalData.push_back               (new gui::SpecialInputTableWidget(...., std::move(carries)); } <\/code><\/pre>\n<p>\u0414\u0430\u043d\u043d\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043f\u043e\u0440\u043d\u043e\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0430 \u0442\u0440\u0435\u0442\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u0438. \u041e\u0431\u0443\u0441\u043b\u043e\u0432\u043b\u0435\u043d\u043e \u043e\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0435\u0446 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430, \u043a\u0430\u043a \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 <em>std::vector<\/em>.<\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c MuditaOS \u0438\u043b\u0438 \u043d\u0435\u0442, \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0432\u043e\u043f\u0440\u043e\u0441 \u0441\u043f\u043e\u0440\u043d\u044b\u0439:<\/p>\n<ul>\n<li>\n<p>\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 <em>std::list<\/em>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442 \u0432 \u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0438 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u044e\u0442 \u0435\u0433\u043e \u0434\u0430\u043b\u044c\u0448\u0435. \u0412 \u044d\u0442\u043e\u043c \u0443\u0437\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043b\u0443\u0447\u0448\u0435 <em>std::list<\/em>, \u0442\u0430\u043a \u043a\u0430\u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043a\u043e\u043d\u0435\u0446 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0430\u043c\u043e\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0440\u0435\u0430\u043b\u043b\u043e\u043a\u0430\u0446\u0438\u0439, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443.<\/p>\n<\/li>\n<li>\n<p>\u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a. \u0423\u0436\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>SpecialInputTableWidget<\/em> \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <em>carriers<\/em> \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <em>std::vector<\/em>. \u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 <em>std::list<\/em> \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0447\u0435\u0433\u043e \u043f\u0440\u0438 \u0435\u0433\u043e \u043e\u0431\u0445\u043e\u0434\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043f\u0440\u043e\u043c\u0430\u0445\u0438 \u043a\u044d\u0448\u0430. \u0412\u0435\u043a\u0442\u043e\u0440 \u0436\u0435, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043f\u0430\u043c\u044f\u0442\u0438, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0434\u0440\u0443\u0436\u0435\u043b\u044e\u0431\u0435\u043d \u043a \u043a\u044d\u0448\u0443 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430. \u042d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u044b\u0438\u0433\u0440\u044b\u0448 \u043f\u0440\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u043c \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0435\u0432\u0435\u043b\u0438\u043a. \u0427\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u043a\u044d\u0448-\u043b\u0438\u043d\u0438\u0435\u0439, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0437\u0430 \u043e\u0434\u043d\u043e \u0447\u0442\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u043e \u0432\u0441\u0435\u0433\u043e \u043f\u0430\u0440\u0430 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043c\u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v826\/\">V826<\/a>. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0427\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445, \u043a\u0430\u043a \u0441\u043b\u0443\u0447\u0430\u0439 \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0438 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u043f\u043e \u0432\u044b\u0445\u043e\u0434\u0443 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u043c, \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e. \u0414\u0440\u0443\u0433\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u043f\u0440\u043e\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0443\u0436\u0435 \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435.<\/p>\n<p>\u042f, \u043a\u0430\u043a \u0438 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0443\u0432\u0435\u0440\u0435\u043d, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437 \u043d\u0438\u0445 \u0441\u0442\u043e\u0438\u0442 \u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u0430 \u043a\u0430\u043a\u0438\u0435 \u043d\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0442\u0430\u0432\u043b\u044e \u0438\u0445 \u043d\u0430 \u043e\u0442\u043a\u0443\u043f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c. \u0410 \u043c\u044b \u0442\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435!<\/p>\n<h4>\u041d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h4>\n<p>\u041e\u0431\u044b\u0447\u043d\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u043e \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b. \u041f\u0440\u043e\u0441\u0442\u043e \u0447\u0438\u0442\u0430\u044f \u043a\u043e\u0434, \u043d\u0435\u043b\u044c\u0437\u044f \u0441 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0438\u043b\u0438 \u0447\u0442\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u043b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442. \u0421\u043a\u043e\u0440\u0435\u0435, \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043e\u0449\u0443\u0449\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043d\u044b\u0439 \u0443\u0447\u0430\u0441\u0442\u043e\u043a \u043a\u043e\u0434\u0430 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0432 \u0445\u043e\u0434\u0435 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0430 \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0443\u044e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c.<\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u043b\u043e\u0433 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438, \u044f \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043e\u0434\u0438\u043d \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043d\u043d\u0430\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 \u0440\u0443\u0433\u0430\u043b\u0430\u0441\u044c:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;valStr&#8217; object of &#8216;basic_string&#8217; type was created but was not utilized. AlarmSettingsModel.cpp 23<\/p>\n<pre><code class=\"cpp\">void AlarmVolumeModel::setValue(std::uint8_t value) {   const auto valStr = std::to_string(value);   audioModel.setVolume(value, AbstractAudioModel::PlaybackType::Alarm, {}); } <\/code><\/pre>\n<p>\u041f\u043e\u0445\u043e\u0436\u0438\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b\u0441\u044f \u043d\u0430 12 \u0441\u0442\u0440\u043e\u043a \u043d\u0438\u0436\u0435:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;valStr&#8217; object of &#8216;basic_string&#8217; type was created but was not utilized. PrewakeUpSettingsModel.cpp 35<\/p>\n<pre><code class=\"cpp\">void PrewakeUpChimeVolumeModel::setValue(std::uint8_t value) {   const auto valStr = std::to_string(value);   audioModel.setVolume(value, AbstractAudioModel::PlaybackType::PreWakeup, {}); } <\/code><\/pre>\n<p>\u0418 \u0435\u0449\u0451 \u043f\u0430\u0440\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043d\u0430 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043a\u043e\u0434\u0430:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;valStr&#8217; object of &#8216;basic_string&#8217; type was created but was not utilized. SnoozeSettingsModel.cpp 76<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;valStr&#8217; object of &#8216;basic_string&#8217; type was created but was not utilized. BedtimeModel.cpp 80<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0434\u0430 \u043d\u0430\u0432\u043e\u0434\u044f\u0442 \u043d\u0430 \u0444\u0438\u043b\u043e\u0441\u043e\u0444\u0441\u043a\u0438\u0435 \u043c\u044b\u0441\u043b\u0438. \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043a\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0438\u043b\u0438. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0434 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u043e \u0440\u0430\u043d\u044c\u0448\u0435&#8230;<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a>. \u0422\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e, \u0438\u0445 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;deviceAddress&#8217; object of &#8216;basic_string&#8217; type was created but was not utilized. A2DP.cpp 332<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;operatorNames&#8217; object of &#8216;vector&#8217; type was created but was not utilized. NetworkSettings.cpp 263<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v808\/\">V808<\/a> &#8216;volume&#8217; object of &#8216;optional&#8217; type was created but was not utilized. AudioServiceAPI.cpp 224<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0421\u0442\u0440\u043e\u043a\u0438<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;\/&#8217; character rather than a string. TagsFetcher.cpp 28<\/p>\n<pre><code class=\"cpp\">std::optional&lt;Tags> fetchTagsInternal(std::string filePath) {   ....   if (const auto pos = filePath.rfind(\"\/\"); pos == std::string::npos)    {     ....   }   .... } <\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435. \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 <em>find<\/em>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0443\u044e \u0441\u0438\u043c\u0432\u043e\u043b \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0438. \u041f\u043e\u0438\u0441\u043a \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u2013 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0432 \u043d\u0438\u0445 \u2013 \u0434\u0432\u0430 \u0446\u0438\u043a\u043b\u0430. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0438\u0449\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b, \u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u043e\u0434\u043d\u0438\u043c. \u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"cpp\">std::optional&lt;Tags> fetchTagsInternal(std::string filePath) {   ....   if (const auto pos = filePath.rfind('\/'); pos == std::string::npos)    {     ....   }   .... } <\/code><\/pre>\n<p>\u0412\u043e\u0442 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;\\&#187;&#8216; character rather than a string. response.cpp 489<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;\\&#187;&#8216; character rather than a string. ATURCStream.cpp 45<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;\\&#187;&#8216; character rather than a string. ATURCStream.cpp 78<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;.&#8217; character rather than a string. DatabaseInitializer.cpp 97<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;.&#8217; character rather than a string. DbInitializer.cpp 87<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216; &#8216; character rather than a string. test-gui-TextBlockCursor.cpp 424<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;+&#8217; character rather than a string. CallForwardingRequest.cpp 82<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;,&#8217; character rather than a string. ServiceCellular.cpp 1398<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v817\/\">V817<\/a> It is more efficient to seek &#8216;a&#8217; character rather than a string. unittest_utf8.cpp 108<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f, \u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0435 \u043e \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v814\/\">V814<\/a> Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. ATStream.cpp 127<\/p>\n<pre><code class=\"cpp\">constexpr auto delimiter = \"\\r\\n\" .... void ATStream::countLines() {   ....   auto pos = ....;   while (pos != std::string::npos)    {     if ((lastPos) != pos)      {       ....     }     lastPos = pos + std::strlen(at::delimiter);   } } <\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>std::strlen<\/em> \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 <em>delimiter<\/em>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u044d\u0442\u0438\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f C++17 \u0438 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0438\u043f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043d\u0430* std::string_view*. \u0420\u0430\u0437\u043c\u0435\u0440 \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u0430 <em>O(1)<\/em>, \u0432\u044b\u0437\u0432\u0430\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e-\u0447\u043b\u0435\u043d* size*:<\/p>\n<pre><code class=\"cpp\">constexpr std::string_view delimiter = \"\\r\\n\" ....  void ATStream::countLines() {   ....   auto pos = ....;   auto delimiterLen = delimiter.size();   while (pos != std::string::npos)    {     if ((lastPos) != pos)      {       ....     }     lastPos = pos + delimiterLen;   } } <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u0441\u043b\u0443\u0447\u0430\u0439:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v814\/\">V814<\/a> Decreased performance. The &#8216;strlen&#8217; function was called multiple times inside the body of a loop. DLCChannel.cpp 140<\/p>\n<p>\u042d\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0432\u0441\u0435 \u043f\u0440\u0438\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b <em>delimiter<\/em>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0430\u0440\u0443 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v810\/\">V810<\/a> Decreased performance. The &#8216;std::strlen(at::delimiter)&#8217; function was called several times with identical arguments. The result should possibly be saved to a temporary variable, which then could be used while calling the &#8216;substr&#8217; function. ATStream.cpp 89<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v811\/\">V811<\/a> Decreased performance. Excessive type casting: string -> char * -> string. Consider inspecting the expression. ATStream.cpp 89<\/p>\n<pre><code class=\"cpp\">bool ATStream::checkATBegin() {   auto pos = atBuffer.find(at::delimiter, std::strlen(at::delimiter));   ....   std::string rr = atBuffer.substr(std::strlen(at::delimiter),                                    pos - std::strlen(at::delimiter)).c_str();   .... } <\/code><\/pre>\n<ul>\n<li>\n<p>\u041f\u0435\u0440\u0432\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>strlen<\/em> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0442\u043e\u0440\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u2013 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0442\u043e-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e\u0435. \u041c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>substr<\/em> \u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>atBuffer<\/em>, \u043e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043d\u0430\u043c <em>std::string<\/em>. \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0443 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>c_str()<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 <em>const<\/em> <em>char*<\/em>. \u041f\u043e\u0441\u043b\u0435 \u043c\u044b \u043e\u043f\u044f\u0442\u044c \u043d\u0435\u044f\u0432\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 <em>std::string (\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0442\u0440\u043e\u043a\u0438, \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 const char*<\/em>, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0432\u044b\u0437\u043e\u0432 <em>strlen<\/em>), \u0438, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>rr<\/em>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u043c \u043e\u0431\u0430 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430, <em>delimiter<\/em> \u0442\u0435\u043f\u0435\u0440\u044c <em>std::string_view<\/em>:<\/p>\n<pre><code class=\"cpp\">bool ATStream::checkATBegin() {   auto delimiterLen = delimiter.size();   auto pos = atBuffer.find(at::delimiter, delimiterLen);   ....   std::string rr = atBuffer.substr(delimiterLen                                    pos - delimiterLen);   .... } <\/code><\/pre>\n<p>\u041f\u043e\u0445\u043e\u0436\u0438\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v810\/\">V810<\/a> \u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v811\/\">V811<\/a>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v810\/\">V810<\/a> Decreased performance. The &#8216;std::strlen(at::delimiter)&#8217; function was called several times with identical arguments. The result should possibly be saved to a temporary variable, which then could be used while calling the &#8216;substr&#8217; function. ATStream.cpp 106<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v810\/\">V810<\/a> Decreased performance. The &#8216;translate_mode_to_attrib(mode)&#8217; function was called several times with identical arguments. The result should possibly be saved to a temporary variable, which then could be used while calling the &#8216;f_chmod&#8217; function. filesystem_vfat.cpp 560<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v810\/\">V810<\/a> Decreased performance. The &#8216;translate_mode_to_attrib(mode)&#8217; function was called several times with identical arguments. The result should possibly be saved to a temporary variable, which then could be used while calling the &#8216;f_chmod&#8217; function. filesystem_vfat.cpp 572<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v811\/\">V811<\/a> Decreased performance. Excessive type casting: string -> char * -> string. Consider inspecting the &#8216;ss.str().c_str()&#8217; expression. AppMessage.hpp 216<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v811\/\">V811<\/a> Decreased performance. Excessive type casting: string -> char * -> string. Consider inspecting the expression. ATStream.cpp 105<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v811\/\">V811<\/a> Decreased performance. Excessive type casting: string -> char * -> string. Consider inspecting second argument of the function handleStart. ServiceAudio.cpp 73<\/p>\n<\/li>\n<\/ul>\n<h4>\u041f\u0440\u043e\u0447\u0435\u0435<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;factory&#8217; variable can be constructed in a lower level scope. CallLogDetailsWindow.cpp 147<\/p>\n<pre><code class=\"cpp\">void CallLogDetailsWindow::initNumberWidget() {   ....   ActiveIconFactory factory(this->application);   ....   if (....)    {     ....   }   else    {     ....     numberHBox->addIcon(factory.makeCallIcon(numberView));     numberHBox->addIcon(factory.makeSMSIcon(numberView));     ....   } } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>factory<\/em> \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0418\u0437\u043c\u0435\u043d\u0438\u0432 \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0435\u0451 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u043c\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">void CallLogDetailsWindow::initNumberWidget() {   ....   if (....)    {     ....   }   else    {     ....     ActiveIconFactory factory(this->application);     numberHBox->addIcon(factory.makeCallIcon(numberView));     numberHBox->addIcon(factory.makeSMSIcon(numberView));     ....   } } <\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> \u0435\u0449\u0451 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u043e\u0432 \u043a\u043e\u0434\u0430. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;size&#8217; variable can be constructed in a lower level scope. BoxLayoutSizeStore.cpp 19<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;local_style&#8217; variable can be constructed in a lower level scope. RichTextParser.cpp 385<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;defaultValue&#8217; variable can be constructed in a lower level scope. ServiceAudio.cpp 702<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;js&#8217; variable can be constructed in a lower level scope. i18n.cpp 84<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v821\/\">V821<\/a> [CERT-DCL19-C] Decreased performance. The &#8216;it&#8217; variable can be constructed in a lower level scope. disk_manager.cpp 49<\/p>\n<\/li>\n<\/ul>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041a\u0430\u043a \u043d\u0438 \u0441\u0442\u0440\u0430\u043d\u043d\u043e, \u044d\u0442\u043e \u0431\u044b\u043b\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439, \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 MuditaOS. \u041d\u0430 \u0434\u0435\u043b\u0435 \u0436\u0435 \u0438\u0445 \u043e\u043a\u043e\u043b\u043e \u0442\u044b\u0441\u044f\u0447\u0438. \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0438\u0442\u0430\u043a \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0438\u043b\u044c\u043d\u043e \u0440\u0430\u0437\u0440\u043e\u0441\u043b\u0430\u0441\u044c \u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0435\u0451 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u044f\u0436\u0435\u043b\u043e \u0447\u0438\u0442\u0430\u0442\u044c.<\/p>\n<p>\u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u0440\u0430\u0432\u043a\u0430 \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0446\u0435\u043b\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0432\u0441\u0435 \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c, \u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0437\u0430\u043c\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0440\u043e\u0441\u0442\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u043e \u0442\u0443\u0442, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u044f, \u0430 \u0432\u0435\u0440\u043d\u0435\u0435, \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u041e\u0434\u043d\u0430\u0436\u0434\u044b \u043d\u0430 \u043a\u043e\u043d\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0438 \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044c, \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0432\u0448\u0438\u0439 \u043a \u043d\u0430\u043c \u043d\u0430 \u0441\u0442\u0435\u043d\u0434, \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e \u0435\u0433\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u043d\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043d\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a, \u0430 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u043f\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, proof-\u043e\u0432 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0443 \u0432\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442, \u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u043f\u0440\u043e\u0431\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0443 \u043d\u0430\u0441 \u043d\u0430 <a href=\"https:\/\/pvs-studio.com\/pvs-studio\/try-free\/?utm_source=habr&amp;utm_medium=articles&amp;utm_content=mudita_os&amp;utm_term=link_try_free\">\u0441\u0430\u0439\u0442\u0435<\/a>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c PVS-Studio \u0438 \u0434\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u2013 \u0442\u043e \u044d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0434\u0435\u043b\u0435.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Vladislav Stolyarov.\u00a0<a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/0925\/\">MuditaOS: Will your alarm clock go off? Part II<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/652771\/\"> https:\/\/habr.com\/ru\/company\/pvs-studio\/blog\/652771\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u042d\u0442\u043e \u0432\u0442\u043e\u0440\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0446\u0438\u043a\u043b\u0430 \u0441\u0442\u0430\u0442\u0435\u0439 \u043f\u0440\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b MuditaOS. \u0412 \u043d\u0435\u0439 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u0431 \u0443\u0437\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c. \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0441\u0430\u0439\u0442\u043e\u0432, \u0433\u0434\u0435 \u0431\u044b\u043b\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/cpp\/0901\/\">\u0422\u043e\u043f-10 C \u0438 \u0421++ \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 PVS-Studio \u0432 2021 \u0433\u043e\u0434\u0443<\/a>, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<blockquote>\n<p>\u041a\u0430\u043a \u0443 PVS-Studio \u043e\u0431\u0441\u0442\u043e\u044f\u0442 \u0434\u0435\u043b\u0430 \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0421++? \u0423\u043c\u0435\u0435\u0442 \u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043a\u043e\u0432\u0430\u0440\u0441\u0442\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u0421++?<\/p>\n<\/blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443 \u043c\u0435\u043d\u044f \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u0438\u0434\u0435\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430\u043c. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445 \u043a\u0430\u043a \u0440\u0430\u0437 \u043c\u043d\u043e\u0433\u043e \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u043c\u0438 \u0438\u0437 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>\u041e\u0442\u043c\u0435\u0447\u0443, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043c\u0438\u043a\u0440\u043e\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c\u0438 \u043d\u0435 \u0437\u0440\u044f. \u041f\u0440\u0430\u0432\u043a\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043d\u0435 \u0434\u0430\u0441\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f, \u0434\u0430 \u043e\u043d\u043e \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0434\u043e\u0439\u0442\u0438 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u043e, \u0442\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c PVS-Studio \u0432 \u043f\u0430\u0440\u0435 \u0441 \u043a\u0430\u043a\u0438\u043c-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u043c. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a \u0436\u0435 \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u043a\u0438. \u0421\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445 \u0432\u044b\u0432\u043e\u0434 \u0438 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0432 \u043c\u0435\u0441\u0442\u0430\u0445, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439. \u041f\u0440\u0438 \u0438\u0445 \u043e\u0446\u0435\u043d\u043a\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0448\u0438\u0440\u0435 \u0438 \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 \u043d\u0438\u0445 \u043a\u0430\u043a \u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u043f\u0440\u0430\u0432\u043a\u0435 \u0432 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u0434\u0430.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u043f\u0440\u043e\u0435\u043a\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u044f \u0437\u0430\u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0433\u043e \u0432\u0435\u0440\u0441\u0438\u0435\u0439 <a href=\"https:\/\/github.com\/mudita\/MuditaOS\/tree\/8cc1f779db7824a665240c5a89f1590a5831502c\">8cc1f77<\/a>. \u0418\u0442\u0430\u043a, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0442\u044f\u043d\u0443\u0442\u044c \u0438 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e \u0436\u0435 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438!<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/h3>\n<h4>\u0421\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;fileIndexerAudioPaths&#8217; to the &#8216;std::move&#8217; function disables move semantics. BellHybridMain.cpp 77<\/p>\n<pre><code class=\"cpp\">int main() {   const std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.emplace_back(sys::CreatorFor&lt;     service::ServiceFileIndexer>(std::move(fileIndexerAudioPaths)));   .... } <\/code><\/pre>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430\u0447\u043d\u0451\u043c \u0441 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u0432\u044b\u0448\u0435\u0434\u0448\u0435\u0433\u043e \u0432 \u043d\u0435\u0434\u0430\u0432\u043d\u0435\u043c \u0440\u0435\u043b\u0438\u0437\u0435 <a href=\"https:\/\/pvs-studio.com\/ru\/blog\/posts\/0897\/\">PVS-Studio 7.16<\/a>. \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e <em>std::move<\/em> \u043f\u044b\u0442\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>\u041a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442: \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0432\u0435\u0434\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>std::move<\/em> \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0438 \u043d\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u043e\u043d \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0441\u044f. \u041e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442 \u043a \u0442\u0438\u043f\u0443 <em>T&amp;&amp;<\/em> \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <em>static_cast<\/em>. \u0413\u0440\u0443\u0431\u043e \u0433\u043e\u0432\u043e\u0440\u044f, \u0432\u044b\u0437\u043e\u0432 <em>std::move<\/em> \u2013 \u044d\u0442\u043e <strong>\u0437\u0430\u043f\u0440\u043e\u0441<\/strong> \u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435, \u0430 \u043d\u0435 \u043f\u0440\u044f\u043c\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u0430 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u0430 \u0432 \u0431\u0430\u0437\u0435 \u0437\u043d\u0430\u043d\u0438\u0439 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;<a href=\"https:\/\/pvs-studio.com\/ru\/blog\/terms\/6514\/\">\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f<\/a>&#171;.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442. \u041f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e, \u0443\u0431\u0440\u0430\u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">int main() {   std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.push_back(sys::CreatorFor&lt;              service::ServiceFileIndexer>(std::move(fileIndexerAudioPaths)));   .... } <\/code><\/pre>\n<p>\u0418\u043b\u0438, \u0435\u0441\u043b\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u0430, \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 <em>std::move<\/em>:<\/p>\n<pre><code class=\"cpp\">int main() {   const std::vector&lt;std::string> fileIndexerAudioPaths = ....   ....   std::vector&lt;std::unique_ptr&lt;sys::BaseServiceCreator>> systemServices;   ....   systemServices.push_back(sys::CreatorFor&lt;                       service::ServiceFileIndexer>(fileIndexerAudioPaths));   .... } <\/code><\/pre>\n<p>\u0422\u0430\u043a\u0436\u0435, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <em>emplace_back<\/em> \u0431\u044b\u043b\u0430 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u043d\u0430 <em>push_back<\/em>. \u0421\u0434\u0435\u043b\u0430\u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043d\u0435\u0441\u043f\u0440\u043e\u0441\u0442\u0430. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430: <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/container\/vector\/emplace_back\"><em>emplace<\/em>_<em>back<\/em><\/a> &#8212; \u044d\u0442\u043e \u0432\u0430\u0440\u0438\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>std::vector<\/em>. \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0451 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0411\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0441\u0442\u0430\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439 \u2013 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0437\u0430 \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430: <a href=\"https:\/\/en.cppreference.com\/w\/cpp\/container\/vector\/push_back\"><em>push_back<\/em><\/a> &#8212; \u044d\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430\u043c\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>std::vector<\/em>.<\/p>\n<p>\u0410 \u043a\u0430\u043a \u0436\u0435 <em>\u043e\u0441\u043e\u0431\u0430\u044f \u0443\u043b\u0438\u0447\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f<\/em> \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>emplace_back<\/em>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u0435? \u0410 \u043c\u0430\u0433\u0438\u0438 \u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442. \u0412 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0442 \u0443 \u0430\u043b\u043b\u043e\u043a\u0430\u0442\u043e\u0440\u0430 \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u0435\u043c\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/quuxplusone.github.io\/blog\/2021\/03\/03\/push-back-emplace-back\/\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>\u041d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 MuditaOS \u0431\u044b\u043b\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>. \u042d\u0442\u043e \u043d\u043e\u0432\u043e\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0438 \u043e\u043d\u043e \u043c\u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;text&#8217; to the &#8216;std::move&#8217; function disables move semantics. OptionBellMenu.hpp 30<\/p>\n<pre><code class=\"cpp\">class OptionBellMenu { public:   OptionBellMenu(const UTF8 &amp;text, ....)     : text(std::move(text))     , ....   {      }   .... private:   UTF8 text;   .... } <\/code><\/pre>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;blocks&#8217; to the &#8216;std::move&#8217; function disables move semantics. TextDocument.cpp 13<\/p>\n<pre><code class=\"cpp\">class TextDocument {   ....   std::list&lt;TextBlock> blocks;   .... } .... TextDocument::TextDocument(const std::list&lt;TextBlock> &amp;blocks)    : blocks(std::move(blocks)) {    } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0441\u0445\u043e\u0436 \u0441 \u0442\u0435\u043c, \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0438 \u043f\u0435\u0440\u0432\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0432\u0438\u0436\u0443 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f. \u0412 \u043e\u0431\u0449\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u044b\u043b\u043e \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043e\u043a\u043e\u043b\u043e 20 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0435\u0449\u0451 \u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0435 \u0441 move-\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u043e\u0439:<\/p>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;snoozed&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. AlarmPresenter.cpp 27<\/p>\n<pre><code class=\"cpp\">void AlarmPopupContract::AlarmModel::setSnoozed(   std::vector&lt;SingleEventRecord> snoozed) {   this->snoozedRecord = snoozed; } <\/code><\/pre>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b \u043a\u043e\u0434, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0435\u0451 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e. \u0414\u0430\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0443\u0431\u0440\u0430\u0432 \u043e\u0434\u043d\u043e \u0438\u0437 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0439. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>std::move<\/em>:<\/p>\n<pre><code class=\"cpp\">void AlarmPopupContract::AlarmModel::setSnoozed(   std::vector&lt;SingleEventRecord> snoozed) {   this->snoozedRecord = std::move(snoozed); } <\/code><\/pre>\n<p>\u0412\u0441\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u0432 \u0440\u0430\u0439\u043e\u043d\u0435 40 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a. \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;result->snoozedAlarms&#8217; to the &#8216;std::move&#8217; function disables move semantics. ActiveNotificationsModel.cpp 213<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;scheme&#8217; to the &#8216;std::move&#8217; function disables move semantics. ColorTestWindow.cpp 79<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a> Passing the const-qualified object &#8216;text&#8217; to the &#8216;std::move&#8217; function disables move semantics. OptionsWidgetMaker.cpp 17<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;dayMonthText&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. CalendarData.hpp 51<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;newRange&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. SpinnerPolicies.hpp 83<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v820\/\">V820<\/a> The &#8216;newRange&#8217; variable is not used after copying. Copying can be replaced with move\/swap for optimization. SpinnerPolicies.hpp 290<\/p>\n<\/li>\n<li>\n<p>&#8230;.<\/p>\n<\/li>\n<\/ul>\n<h4>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 std::optional<\/h4>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;draft.value()&#8217; expression to &#8216;*draft&#8217;. SMSInputWidget.cpp 158<\/p>\n<pre><code class=\"cpp\">class SMSInputWidget : public ListItem {   ....   std::optional&lt;SMSRecord> draft;   .... }  ....  void SMSInputWidget::updateDraftMessage(....) {   ....   if (draft.has_value())    {     app->updateDraft(draft.value(), inputText);   }   .... } <\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 <em>has_value<\/em> \u043c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>draft<\/em>, \u0442\u0438\u043f \u043a\u043e\u0442\u043e\u0440\u043e\u0439 <em>std::optional<\/em>, \u0442\u043e\u0447\u043d\u043e \u0435\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0437\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u043e\u0434 <em>value()<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0435\u0440\u0435\u0434 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442, \u0435\u0441\u0442\u044c \u043b\u0438 \u043e\u043d\u043e, \u0430 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c <em>*<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0451\u0442 \u0437\u0430\u0432\u0435\u0434\u043e\u043c\u043e \u0438\u043c\u0435\u044e\u0449\u0435\u0435\u0441\u044f \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u044b <a href=\"https:\/\/godbolt.org\/z\/We6s5q5h1\">\u043d\u0435\u043f\u043b\u043e\u0445\u043e<\/a> \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434. \u0414\u0430, \u044d\u0442\u0443 \u043f\u0440\u0430\u0432\u043a\u0443 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u0437\u0432\u0430\u0442\u044c <em>\u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0441 \u0446\u0435\u043b\u044c\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0433\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432<\/em>. \u0415\u0441\u043b\u0438 \u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u043d\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u0435\u043b\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u0438\u043d\u043b\u0430\u0439\u043d\u0438\u043d\u0433) \u0438\u043b\u0438 \u0436\u0451\u0441\u0442\u043a\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0430 \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043d\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435:<\/p>\n<pre><code class=\"cpp\">void SMSInputWidget::updateDraftMessage(....) {   ....   if (draft.has_value())    {     app->updateDraft(*draft, inputText);   }   .... } <\/code><\/pre>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u043f\u043e\u0445\u043e\u0436\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">void ThreadItem::setContactName(std::optional&lt;long int> numberImportance) {   ....   if (numberImportance.has_value())    {     displayNumberImportance(numberImportance.value());   }   .... } <\/code><\/pre>\n<p>\u041e\u0442\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"cpp\">void ThreadItem::setContactName(std::optional&lt;long int> numberImportance) {   ....   if (numberImportance.has_value())    {     displayNumberImportance(*numberImportance);   }   .... } <\/code><\/pre>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0440\u0430\u0432\u043e\u043a \u0435\u0441\u0442\u044c \u043c\u0438\u043d\u0443\u0441: \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>*<\/em> \u0438 \u043d\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0432\u0435\u0434\u0451\u0442\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c. \u0415\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043b\u044e\u0434\u0435\u0439, \u0441\u0447\u0438\u0442\u0430\u044e\u0449\u0438\u0445, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0437 \u0438\u0445 \u0447\u0438\u0441\u043b\u0430, \u0442\u043e \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/manual\/0017\/\">\u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c<\/a>.<\/p>\n<p>\u0422\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0441 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 <a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v833\/\">V833<\/a>, \u0431\u044b\u043b\u043e \u0432\u044b\u0434\u0430\u043d\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0439 (\u0432\u0441\u0435\u0433\u043e 66). \u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u0441\u043f\u0438\u0441\u043a\u0430, \u044d\u0442\u043e \u0437\u0430\u043d\u044f\u043b\u043e \u0431\u044b \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043b\u0438\u0448\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437 \u043d\u0438\u0445:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;lastSms.value()&#8217; expression to &#8216;*lastSms&#8217;. NewMessage.cpp 358<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;currentFileToken.value()&#8217; expression to &#8216;*currentFileToken&#8217;. SongsPresenter.cpp 69<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;returnedContact.value()&#8217; expression to &#8216;*returnedContact&#8217;. PhonebookNewContact.cpp 171<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased performance. Consider replacing the &#8216;activeDevice.value()&#8217; expression to &#8216;*activeDevice&#8217;. BluetoothSettingsModel.cpp 94<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/pvs-studio.com\/ru\/docs\/warnings\/v830\/\">V830<\/a> Decreased<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-329925","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=329925"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/329925\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=329925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=329925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=329925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}