{"id":374916,"date":"2024-05-21T06:12:07","date_gmt":"2024-05-21T06:12:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=374916"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=374916","title":{"rendered":"<span>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 qdEngine, \u0447\u0430\u0441\u0442\u044c \u043f\u0435\u0440\u0432\u0430\u044f: \u0442\u043e\u043f 10 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 PVS-Studio<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yy\/es\/bm\/yyesbmkf7yiey1y48dn04tu1yxg.png\" alt=\"\u0411\u0440\u0430\u0442\u044c\u044f \u041f\u0438\u043b\u043e\u0442\u044b, qdEngine, PVS-Studio\" data-src=\"https:\/\/habrastorage.org\/webt\/yy\/es\/bm\/yyesbmkf7yiey1y48dn04tu1yxg.png\"\/><br \/>  \u0411\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 qdEngine, \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0435\u0448\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u043a\u0443\u0447\u0443 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0442\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0439\u0434\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0440\u0438\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 PVS-Studio.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"knopka-best\">\u041a\u043d\u043e\u043f\u043a\u0430 Best<\/h2>\n<p>  <\/p>\n<p>\u0410\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u044f K-D Lab \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u0433\u0440\u043e\u0432\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 <a href=\"https:\/\/github.com\/KD-lab-Open-Source\/qdEngine\">qdEngine<\/a>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0432\u0435\u0441\u0442\u043e\u0432 (<a href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=60752\">\u043d\u043e\u0432\u043e\u0441\u0442\u044c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 opennet<\/a>). \u0414\u0432\u0438\u0436\u043e\u043a \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C++ \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0434\u043b\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043a\u043e\u0434\u0430 PVS-Studio.<\/p>\n<p>  <\/p>\n<p>\u0418 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0439\u0442\u0438 \u043c\u0438\u043c\u043e \u0434\u0432\u0438\u0436\u043a\u0430, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432 \u0441\u0432\u043e\u0451 \u0432\u0440\u0435\u043c\u044f \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0442\u0430\u043a\u0438\u0435 \u0438\u0433\u0440\u044b, \u043a\u0430\u043a:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0411\u0440\u0430\u0442\u044c\u044f \u041f\u0438\u043b\u043e\u0442\u044b 3D. \u0414\u0435\u043b\u043e \u043e\u0431 \u041e\u0433\u043e\u0440\u043e\u0434\u043d\u044b\u0445 \u0432\u0440\u0435\u0434\u0438\u0442\u0435\u043b\u044f\u0445;<\/li>\n<li>\u0411\u0440\u0430\u0442\u044c\u044f \u041f\u0438\u043b\u043e\u0442\u044b 3D-2. \u0422\u0430\u0439\u043d\u044b \u041a\u043b\u0443\u0431\u0430 \u0421\u043e\u0431\u0430\u043a\u043e\u0432\u043e\u0434\u043e\u0432;<\/li>\n<li>\u0411\u0440\u0430\u0442\u044c\u044f \u041f\u0438\u043b\u043e\u0442\u044b. \u041e\u0431\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u0430 \u0417\u0435\u043c\u043b\u0438;<\/li>\n<li>\u041d\u0443, \u043f\u043e\u0433\u043e\u0434\u0438! \u0412\u044b\u043f\u0443\u0441\u043a 3. \u041f\u0435\u0441\u043d\u044f \u0434\u043b\u044f \u0437\u0430\u0439\u0446\u0430;<\/li>\n<li>\u041f\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0431\u0440\u0430\u0432\u043e\u0433\u043e \u0441\u043e\u043b\u0434\u0430\u0442\u0430 \u0428\u0432\u0435\u0439\u043a\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b, \u0438 \u0438\u0445 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u0437\u0440\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0435 \u0442\u0435\u043c\u044b, \u0438 \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0435 <strong>Best<\/strong> \u0432 \u043f\u043b\u0430\u0433\u0438\u043d\u0430\u0445 <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/\">PVS-Studio<\/a>.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/d5d\/b2f\/493\/d5db2f493ea9b4275d153aa0c22f7b33.png\" alt=\"PVS-Studio \u0422\u043e\u043f 10 \u0431\u0430\u0433\u043e\u0432\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d5d\/b2f\/493\/d5db2f493ea9b4275d153aa0c22f7b33.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041a\u043d\u043e\u043f\u043a\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c PVS-Studio. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0412\u0441\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0432\u044b\u0434\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043e\u043a\u0430\u0436\u0443\u0442\u0441\u044f \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043b\u0438 \u043b\u043e\u0436\u043d\u044b\u043c\u0438. \u042d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 PVS-Studio, \u0438\u043c\u0435\u044e\u0442 \u0433\u0438\u0431\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u0441\u044f \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430, \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0434\u0435\u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043d\u0435\u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438. \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u043d\u043e\u043f\u043a\u0430 <strong>Best<\/strong> \u043a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u043d\u0435\u0451 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 10 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439. \u041f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u043e\u043d \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0430, \u043d\u043e \u0438 \u0441\u0442\u0430\u0440\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043e\u0448\u0438\u0431\u043e\u043a.<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u0432\u044b\u0431\u0440\u0430\u0442\u044c 10 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u0447\u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u043e\u0439, \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0443 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v668\/\">V668<\/a>. \u041e\u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0430\u0435\u0442 \u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0440\u043d\u0443\u043b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>new<\/em>. \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 Minetest:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">clouds = new Clouds(smgr, -1, time(0)); if (!clouds) {  *error_message = \"Memory allocation error (clouds)\";   errorstream &lt;&lt; *error_message &lt;&lt; std::endl;   return false; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0451\u043b \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434, \u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0435\u0449\u0451 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <em>nothrow<\/em>-\u0432\u0435\u0440\u0441\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>new<\/em>, \u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u043c\u043d\u043e\u0433\u043e. \u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u043d\u0430\u0448\u043b\u0438 \u0443\u0436\u0435 1630 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0431\u0430\u0433\u043e\u0432 \u0432 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445! \u0421 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c.<\/p>\n<p>  <\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u042d\u0442\u043e \u043d\u0435\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e. \u041d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0441\u0435\u043c\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043f\u0440\u043e <em>new<\/em>.<\/li>\n<li>\u0414\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043a\u0440\u0438\u0442\u0438\u0447\u043d\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u043a\u0430\u043a \u0440\u0430\u0437 \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u0443\u0447\u0430\u0439. \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0438\u0436\u0438\u043c\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043d\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0438 \u043a\u0440\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438. \u0427\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043e\u0448\u0438\u0431\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0438\u0449\u0435\u043c, \u0442\u0435\u043c \u0442\u0440\u0443\u0434\u043d\u0435\u0435 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0439\u0434\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0430\u0433. \u0414\u0430\u0436\u0435 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u043e\u043c\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0432\u0443 \u0432 \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445.<\/li>\n<\/ol>\n<\/div><\/div>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 qdEngine \u044d\u0442\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u0445\u043e\u0440\u043e\u0448\u043e:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0432\u043e\u0441\u0435\u043c\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043d\u0430 \u0431\u0430\u0433\u0438 \u0438\u043b\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u044b\u0439 \u043a\u043e\u0434;<\/li>\n<li>\u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043d\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442;<\/li>\n<li>\u043e\u0434\u043d\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043b\u043e\u0436\u043d\u043e\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0432\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0445 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u044d\u0442\u043e \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0451\u0442 \u0442\u0435\u0445, \u043a\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u043b \u043f\u0440\u043e PVS-Studio, \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0435\u043b\u0435. <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/download\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1119\">\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0439\u0442\u0435<\/a>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0439\u0442\u0435, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0439\u0442\u0435 \u043a\u043d\u043e\u043f\u043a\u0443 <strong>Best<\/strong>. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0451\u0442 \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043d\u0430\u043c \u0432 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443. \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u0434\u0441\u043a\u0430\u0436\u0435\u043c \u0438 \u043f\u043e\u043c\u043e\u0436\u0435\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"preduprezhdeniya\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f<\/h2>\n<p>  <\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0431\u0435\u0449\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043e\u0434\u043d\u043e \u043a\u043e\u0435-\u0433\u0434\u0435 \u043f\u043e\u0443\u043f\u0440\u0430\u0436\u043d\u044f\u0435\u043c\u0441\u044f \u0432 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n1-dublikat\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N1: \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool qdGameObject::init() {   ....   drop_flag(QD_OBJ_STATE_CHANGE_FLAG | QD_OBJ_IS_IN_TRIGGER_FLAG |             QD_OBJ_STATE_CHANGE_FLAG | QD_OBJ_IS_IN_INVENTORY_FLAG);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v501\/\">V501<\/a> There are identical sub-expressions &#8216;QD_OBJ_STATE_CHANGE_FLAG&#8217; to the left and to the right of the &#8216;|&#8217; operator. qd_game_object.cpp 176<\/p>\n<p>  <\/p>\n<p>\u0414\u0432\u0430\u0436\u0434\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <em>QD_OBJ_STATE_CHANGE_FLAG<\/em>, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <em>qd_game_object.h<\/em> \u0440\u044f\u0434\u043e\u043c \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">.... const int QD_OBJ_HAS_BOUND_FLAG           = 0x80; const int QD_OBJ_DISABLE_MOVEMENT_FLAG    = 0x100; const int QD_OBJ_DISABLE_MOUSE_FLAG       = 0x200; const int QD_OBJ_IS_IN_TRIGGER_FLAG       = 0x400; const int QD_OBJ_STATE_CHANGE_FLAG        = 0x800; const int QD_OBJ_IS_IN_INVENTORY_FLAG     = 0x1000; const int QD_OBJ_KEYBOARD_CONTROL_FLAG    = 0x2000; ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0437\u0430\u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0434\u043b\u044f \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u043a\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442, \u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0422\u043e\u0447\u043d\u043e \u043c\u043d\u0435 \u0442\u0443\u0442 \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n2-opechatka-poteryannyy-simvol-\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N2: \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 (\u043f\u043e\u0442\u0435\u0440\u044f\u043d\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b #)<\/h3>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u0430\u044f, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0448\u0438\u0431\u043a\u0430. \u0421\u043e\u0433\u043b\u0430\u0441\u0435\u043d, \u0443 \u043c\u0435\u043d\u044f \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u0439 \u0432\u043a\u0443\u0441 \u0438 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u0435\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043d\u043e, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u044b \u0442\u043e\u0436\u0435 \u043e\u0446\u0435\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0431\u0430\u0433.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">const qdGameObjectStateWalk* qdGameObjectMoving::current_walk_state() const {   const qdGameObjectState* st = get_cur_state();   if(!st || st -> state_type() != qdGameObjectState::STATE_WALK){ #ifndef _QUEST_EDITOR     st = last_walk_state_;     if(!st || st -> state_type() != qdGameObjectState::STATE_WALK)       st = get_default_state(); else     st = get_default_state();     if(!st) st = get_state(0); #endif   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v523\/\">V523<\/a> The &#8216;then&#8217; statement is equivalent to the &#8216;else&#8217; statement. qd_game_object_moving.cpp 2781<\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">  if(!st || st -> state_type() != qdGameObjectState::STATE_WALK)     st = get_default_state(); else   st = get_default_state();<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u0434 \u043a\u0430\u043a-\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u043e \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d. \u042f \u0438\u043c\u0435\u044e \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e <em>else<\/em> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u043a\u043e\u0434 \u0440\u044f\u0434\u043e\u043c \u0438 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <em>else<\/em>, \u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 \u043f\u0440\u0435\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0430 <em>#else<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u0430\u043b\u0441\u044f \u0438 \u0437\u0430\u0431\u044b\u043b \u0441\u0438\u043c\u0432\u043e\u043b \u0440\u0435\u0448\u0451\u0442\u043a\u0438 (<em>#<\/em>).<\/p>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">const qdGameObjectState* st = get_cur_state(); if(!st || st -> state_type() != qdGameObjectState::STATE_WALK){ #ifndef _QUEST_EDITOR   st = last_walk_state_;   if(!st || st -> state_type() != qdGameObjectState::STATE_WALK)     st = get_default_state(); #else   st = get_default_state();   if(!st) st = get_state(0); #endif<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n3-neispolzuemaya-stroka\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N3: \u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool qdGameScene::adjust_files_paths(....) {   ....   for(qdGameObjectList::const_iterator it = object_list().begin();       it != object_list().end(); ++it)   {     if((*it) -> named_object_type() == QD_NAMED_OBJECT_STATIC_OBJ)     {       qdGameObjectStatic* obj = static_cast&lt;qdGameObjectStatic*>(*it);       if(obj -> get_sprite() -> file())         QD_ADJUST_TO_REL_FILE_MEMBER(pack_corr_dir,                                       obj -> get_sprite() -> file,                                       obj -> get_sprite() -> set_file,                                       can_overwrite,                                       all_ok);         std::string str = obj -> get_sprite() -> file();       str = str;     }   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v570\/\">V570<\/a> The &#8216;str&#8217; variable is assigned to itself. qd_game_scene.cpp 1799<\/p>\n<p>  <\/p>\n<p>\u0412 \u0446\u0438\u043a\u043b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430 \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u0432. \u041a\u0430\u043a \u044f \u043f\u043e\u043d\u0438\u043c\u0430\u044e, \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u044d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">std::string str = obj -> get_sprite() -> file(); str = str;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u0431\u0435\u0440\u0451\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430. \u0412\u0442\u043e\u0440\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043b\u0443\u0436\u0438\u0442 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041d\u0430 \u043d\u0435\u0451 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u0432 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0435 \u0438 \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>str<\/em>.<\/li>\n<li>\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0441\u0430\u043c\u043e\u043c\u0443 \u0441\u0435\u0431\u0435 \u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\/\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>str<\/em> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0438 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043a\u043e\u0434 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c, \u0438 \u0435\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u2014 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u043e\u0432\u043e\u0434 \u0437\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u044f \u0431\u044b \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>file<\/em> \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 <em>qdSprite<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">const char* file() const { return file_.c_str(); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0442\u0440\u0430\u043d\u043d\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 <em>std::string<\/em> \u043a\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0430 \u0437\u0430\u0442\u0435\u043c \u0435\u0449\u0451 \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0435\u0433\u043e \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445 \u043d\u0430 <em>nullptr<\/em>. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u0432\u0435\u0440\u043d\u0451\u0442 <em>nullptr<\/em>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u043d\u0443\u0436\u0435\u043d \u0438\u043c\u0435\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u0442\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u0437\u0432\u0430\u0442\u044c <em>c_str<\/em>. \u0418\u0437\u043c\u0435\u043d\u0451\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">const std::string&amp; file() const { return file_; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0442\u0440\u043e\u043d\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442 \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>set_file<\/em>. \u041e\u0434\u043d\u0430\u043a\u043e \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043f\u043e\u0448\u043b\u043e \u0431\u044b \u043a\u043e\u0434\u0443 \u043d\u0430 \u043f\u043e\u043b\u044c\u0437\u0443.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c. \u041f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0439 \u0440\u0430\u043d\u0435\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if((*it) -> named_object_type() == QD_NAMED_OBJECT_STATIC_OBJ) {   qdGameObjectStatic* obj = static_cast&lt;qdGameObjectStatic*>(*it);   const std::string &amp;file = obj -> get_sprite() -> file();   QD_ADJUST_TO_REL_FILE_MEMBER(pack_corr_dir,                                 file,                                 obj -> get_sprite() -> set_file,                                 can_overwrite,                                 all_ok);   }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0423\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041a\u043e\u0434 \u0441\u0442\u0430\u043b \u043a\u043e\u0440\u043e\u0447\u0435 \u0438 \u043f\u0440\u043e\u0449\u0435.<\/li>\n<li>\u0418\u0441\u0447\u0435\u0437\u043b\u0430 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f.<\/li>\n<li>\u041d\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <em>std::string<\/em> \u0432 \u0446\u0438\u043a\u043b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0449\u0435 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0451\u043c\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0438\u0437-\u0437\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0438, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0443\u0434\u0430\u043b\u0438\u0442 \u0432\u0441\u0451 \u043b\u0438\u0448\u043d\u0435\u0435. <\/li>\n<li>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0432\u044b\u0434\u0430\u0451\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v570\/\">V570<\/a>.<\/li>\n<li>\u0412 \u0446\u0435\u043b\u044f\u0445 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0432\u0441\u0451 \u0442\u0430\u043a \u0436\u0435 \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0430 (\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0443 \u0441 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u043c <em>QD_ADJUST_TO_REL_FILE_MEMBER<\/em>) \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430.<\/li>\n<\/ol>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n4-potencialnoe-ispolzovanie-nulevogo-ukazatelya\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N4: \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool DDraw_grDispatcher::Finit() {   ....   ddobj_ -> SetCooperativeLevel((HWND)Get_hWnd(),DDSCL_NORMAL);   if(fullscreen_ &amp;&amp; ddobj_) ddobj_ -> RestoreDisplayMode();   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v595\/\">V595<\/a> The &#8216;ddobj_&#8217; pointer was utilized before it was verified against nullptr. Check lines: 211, 212. ddraw_gr_dispatcher.cpp 211<\/p>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>ddobj<\/em> \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0438\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f. \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>ddobj<\/em> \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c <em>nullptr<\/em>, \u043e \u0447\u0451\u043c \u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442 \u043d\u0430\u0441.<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (ddobj_) {   ddobj_ -> SetCooperativeLevel((HWND)Get_hWnd(),DDSCL_NORMAL);   if(fullscreen_) ddobj_ -> RestoreDisplayMode(); }<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n5-destruktor-ne-yavlyaetsya-virtualnym\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N5: \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">template &lt;class T> class PtrHandle  {   ....   ~PtrHandle() { delete ptr; }   .... private:   T *ptr; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v599\/\">V599<\/a> Instantiation of PtrHandle &lt; ResourceUser >: The virtual destructor is not present, although the &#8216;ResourceUser&#8217; class contains virtual functions. Handle.h 14<\/p>\n<p>  <\/p>\n<p>\u0412 \u043a\u043e\u0434\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 <em>PtrHandle<\/em> \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043d\u0451\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <em>ResourceUser<\/em>. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">class ResourceUser {           int ID;   static int IDs; public:   ResourceUser(time_type period) { dtime = period; time = 0; ID = ++IDs; }   virtual int quant() { return 1; }   protected:   time_type time;   time_type dtime;      virtual void init_time(time_type time_) { time = time_ + time_step(); }    virtual time_type time_step() { return dtime; }     friend class ResourceDispatcher; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 \u0435\u0441\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0443\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b. \u0410 \u0440\u0430\u0437 \u0442\u0430\u043a, \u0442\u043e \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u043a\u0430\u043a \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 <em>PtrHandle<\/em> \u0431\u0443\u0434\u0435\u0442 \u043d\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0440\u0430\u0437\u0440\u0443\u0448\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 <em>ResourceUser<\/em>. \u042d\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e \u0438 \u0443\u0442\u0435\u0447\u043a\u0430\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n6-nevernyy-operator-delete\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N6: \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 delete<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">char* grDispatcher::temp_buffer(int size) {   if(size &lt;= 0) size = 1;    if(size > temp_buffer_size_){     delete temp_buffer_;     temp_buffer_ = new char[size];     temp_buffer_size_ = size;   }    return temp_buffer_; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v611\/\">V611<\/a> The memory was allocated using the &#8216;operator new[]&#8217; but was released using the &#8216;operator delete&#8217;. The &#8216;delete[] temp_buffer_;&#8217; statement should be used instead. Check lines: 1241, 1242. gr_dispatcher.cpp 1241<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>temp_buffer_<\/em> \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043d\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>new[]<\/em>. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0430\u0442\u044c\u0441\u044f \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <em>delete[]<\/em>.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u043c \u043a\u043e\u0434\u0435 \u0434\u043b\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e <em>delete<\/em>, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041a\u0442\u043e-\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u0440\u0430\u0437\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0451 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 <em>char<\/em>, \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 <em>new<\/em>\/<em>delete<\/em> \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <em>malloc<\/em>\/<em>free<\/em>. <a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0973\/\">\u042d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a<\/a>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441 \u0446\u0435\u043b\u044c\u044e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 (\u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445) \u043f\u0443\u043b\u0430\u0445 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n7-oshibochnyy-tip-peremennoy-dlya-sinhronizacii\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N7: \u043e\u0448\u0438\u0431\u043e\u0447\u043d\u044b\u0439 \u0442\u0438\u043f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0434\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">static int b_thread_must_stop=0;  void MpegDeinitLibrary() {   ....   if (hThread!=INVALID_HANDLE_VALUE)   {     b_thread_must_stop=1;     while(b_thread_must_stop==1)       Sleep(10);   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v712\/\">V712<\/a> Be advised that compiler may delete this cycle or make it infinity. Use volatile variable(s) or synchronization primitives to avoid this. PlayOgg.cpp 293<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u043a\u043d\u043e\u0432\u0435\u043d\u043d\u0430\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f. \u042d\u0442\u043e \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434, \u0447\u0442\u043e \u043e\u043d\u0430 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0432\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b. \u0412\u0434\u043e\u0431\u0430\u0432\u043e\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u0438\u043f <em>int<\/em> \u043d\u0430 <em><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/atomic\/atomic\">atomic_int<\/a><\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">#include &lt;atomic> static atomic_int b_thread_must_stop { 0 };<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n8-utechka-pamyati\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N8: \u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool qdAnimationMaker::insert_frame(....) {   \/\/ IMPORTANT(pabdulin): auto_ptr usage was removed   qdAnimationFrame* fp = new qdAnimationFrame;   fp -> set_file(fname);   fp -> set_length(default_frame_length_);    if (!fp -> load_resources())     return false;   ....   delete fp;   return true; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v773\/\">V773<\/a> The function was exited without releasing the &#8216;fp&#8217; pointer. A memory leak is possible. qd_animation_maker.cpp 40<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043e\u0441\u0440\u043e\u0447\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0451\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>fp<\/em>. \u041f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442 \u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (!fp -> load_resources()) {   delete fp;   return false; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u043a\u043e\u0434 \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u043b\u044c\u0437\u044f \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u043c. \u0420\u0443\u0447\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u044c\u044e \u043f\u0440\u043e\u0432\u043e\u0446\u0438\u0440\u0443\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0438, \u0447\u0442\u043e \u043c\u044b \u0437\u0434\u0435\u0441\u044c \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043c\u043d\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438.<\/p>\n<p>  <\/p>\n<p>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\/\/ IMPORTANT(pabdulin): auto_ptr usage was removed<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u0433\u0434\u0430-\u0442\u043e \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c, \u043f\u043e\u043a\u0430 \u0432 \u043d\u0451\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0443\u043c\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0442\u0438\u043f\u0430 <em><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/auto_ptr\">std::auto_ptr<\/a><\/em>. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0443\u0441\u0442\u0430\u0440\u0435\u043b. \u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430 <em><a href=\"https:\/\/en.cppreference.com\/w\/cpp\/memory\/unique_ptr\">std::unique_ptr<\/a><\/em>, \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u0440\u0435\u0448\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438 &#171;\u0432 \u0440\u0443\u0447\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435&#187;, \u043d\u043e \u043d\u0435 \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0441 \u0437\u0430\u0434\u0430\u0447\u0435\u0439.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n9-lozhnoe-srabatyvanie\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N9: \u043b\u043e\u0436\u043d\u043e\u0435 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">class PtrHandle  {   ....   PtrHandle&amp; operator=(PtrHandle&amp; p)    {      if (get() != p.get())      {        delete ptr;        ptr = p.release();      }      return *this;    }   ....    T* get() const { return ptr; }   .... private:   T *ptr; };<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v794\/\">V794<\/a> The assignment operator should be protected from the case of &#8216;this == &amp;p&#8217;. Handle.h 19<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0437 10 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043b\u043e\u0436\u043d\u044b\u043c. \u0414\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0430 <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v794\/\">V794<\/a> \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u0435\u0442, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0451\u043d \u043e\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0438\u0449\u0435\u0442 \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u0432\u0438\u0434\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (this != &amp;p)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 <em>get<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (get() != p.get())<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0430\u0432\u0442\u043e\u0440 \u0445\u043e\u0442\u0435\u043b \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043c\u043d\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u0435\u0431\u044f, \u0430 \u043e\u0442 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0432\u0443\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u043c\u043d\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u0439, \u0441\u0441\u044b\u043b\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u0415\u0441\u043b\u0438 \u0434\u0432\u0430 \u0443\u043c\u043d\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f (\u0431\u0435\u0437 \u043f\u043e\u0434\u0441\u0447\u0451\u0442\u0430 \u0441\u0441\u044b\u043b\u043e\u043a) \u0441\u0441\u044b\u043b\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442, \u0442\u043e \u044d\u0442\u043e \u0431\u0435\u0434\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0434\u0432\u043e\u0439\u043d\u043e\u0433\u043e \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  <\/p>\n<p>\u0422\u0430\u043a \u0447\u0442\u043e \u0442\u0430\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0438\u0447\u0435\u043c \u043d\u0435 \u043b\u0443\u0447\u0448\u0435. \u041e\u043d\u0430 \u043b\u0438\u0448\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0438 \u043b\u044e\u0434\u0435\u0439, \u0447\u0438\u0442\u0430\u044e\u0449\u0438\u0445 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u0427\u0442\u043e \u0436, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0427\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u043e\u0436\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1.<\/strong> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">PtrHandle&amp; operator=(PtrHandle&amp; p)  { \/\/-V794   if (get() != p.get())<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 PVS-Studio, \u0447\u0442\u043e \u043a\u043e\u0434 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u0435\u043d.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2.<\/strong> \u041f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (this != &amp;p)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043d\u0435, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0441\u044f \u0442\u044f\u0436\u0435\u043b\u043e\u0432\u0435\u0441\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">PtrHandle&amp; operator=(PtrHandle&amp; p)  {    if (this != &amp;p)   {      if (get() == p.get())     {        \/\/ \u0412\u0441\u0451 \u043f\u043b\u043e\u0445\u043e. \u041e\u0434\u0438\u043d \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0434\u0432\u0443\u0445 \u0443\u043c\u043d\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u0445.        \/\/ \u0412\u0440\u0435\u043c\u044f \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f.        assert(false);        throw std::logic_error(\"Multiple ownership of an object.\");     }     delete ptr;      ptr = p.release();    }    return *this;  }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u044f\u0432\u0438\u0442\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044e, \u043a\u043e\u0433\u0434\u0430 \u0434\u0432\u0430 \u0443\u043c\u043d\u044b\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0432\u0434\u0440\u0443\u0433 \u0431\u0443\u0434\u0443\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<p>  <\/p>\n<h3 id=\"preduprezhdenie-n10-povtornoe-prisvaivanie\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 N10: \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<pre><code class=\"cpp\">bool qdGameObjectMoving::update_screen_pos() {   ....   if(get_cur_state() -> state_type() == qdGameObjectState::STATE_WALK){     qdGameObjectStateWalk::OffsetType offs_type=       qdGameObjectStateWalk::OFFSET_WALK;               \/\/ &lt;=      switch(movement_mode_){     case MOVEMENT_MODE_STOP:       offs_type = qdGameObjectStateWalk::OFFSET_STATIC;       break;     case MOVEMENT_MODE_TURN:       offs_type = qdGameObjectStateWalk::OFFSET_STATIC;       break;     case MOVEMENT_MODE_START:       offs_type = qdGameObjectStateWalk::OFFSET_START;       break;     case MOVEMENT_MODE_MOVE:       offs_type = qdGameObjectStateWalk::OFFSET_WALK;   \/\/ &lt;=       break;     case MOVEMENT_MODE_END:       offs_type = qdGameObjectStateWalk::OFFSET_END;       break;     }      offs += static_cast&lt;qdGameObjectStateWalk*>(       get_cur_state()) -> center_offset(direction_angle_, offs_type);   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1048\/\">V1048<\/a> The &#8216;offs_type&#8217; variable was assigned the same value. qd_game_object_moving.cpp 1094<\/p>\n<p>  <\/p>\n<p>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0443 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0432\u0435\u0442\u043a\u0435 <em>MOVEMENT_MODE_MOVE<\/em> \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>offs_type<\/em> \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438 \u0442\u0430\u043a \u0432 \u043d\u0435\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0440\u0430\u0432. \u041f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0435 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u0430 \u043e\u0448\u0438\u0431\u043a\u043e\u0439.<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0430\u0433\u0430 \u043d\u0435\u0442. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1.<\/strong> \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 <em>\/\/-V1048<\/em> \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2.<\/strong> \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434, \u0434\u043e\u0431\u0430\u0432\u0438\u0432 <em>default<\/em>-\u0432\u0435\u0442\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(get_cur_state() -> state_type() == qdGameObjectState::STATE_WALK){   qdGameObjectStateWalk::OffsetType offs_type;   switch(movement_mode_){   case MOVEMENT_MODE_STOP:     offs_type = qdGameObjectStateWalk::OFFSET_STATIC;     break;   case MOVEMENT_MODE_TURN:     offs_type = qdGameObjectStateWalk::OFFSET_STATIC;     break;   case MOVEMENT_MODE_START:     offs_type = qdGameObjectStateWalk::OFFSET_START;     break;   case MOVEMENT_MODE_MOVE:     offs_type = qdGameObjectStateWalk::OFFSET_WALK;     break;   case MOVEMENT_MODE_END:     offs_type = qdGameObjectStateWalk::OFFSET_END;     break;   default:     offs_type = qdGameObjectStateWalk::OFFSET_WALK;   }    offs += static_cast&lt;qdGameObjectStateWalk*>(     get_cur_state()) -> center_offset(direction_angle_, offs_type); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442, \u043d\u043e \u043c\u043d\u0435 \u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>offs_type<\/em> \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043c\u0435\u0441\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0435\u0449\u0451 \u043e\u0434\u0438\u043d \u0448\u0430\u0433 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0438 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">qdGameObjectStateWalk::OffsetType qdGameObjectMoving::GetOffsetType() {   switch(movement_mode_){   case MOVEMENT_MODE_STOP:    return qdGameObjectStateWalk::OFFSET_STATIC;   case MOVEMENT_MODE_TURN:    return qdGameObjectStateWalk::OFFSET_STATIC;   case MOVEMENT_MODE_START:   return qdGameObjectStateWalk::OFFSET_START;   case MOVEMENT_MODE_MOVE:    return qdGameObjectStateWalk::OFFSET_WALK;   case MOVEMENT_MODE_END:     return qdGameObjectStateWalk::OFFSET_END;   }   return qdGameObjectStateWalk::OFFSET_WALK; } .... if(get_cur_state() -> state_type() == qdGameObjectState::STATE_WALK){   qdGameObjectStateWalk::OffsetType offs_type = GetOffsetType();   offs += static_cast&lt;qdGameObjectStateWalk*>(     get_cur_state()) -> center_offset(direction_angle_, offs_type);} ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0434 \u0441\u0442\u0430\u043b \u043a\u043e\u0440\u043e\u0447\u0435 \u0438 \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f. \u041e\u0442\u043b\u0438\u0447\u043d\u043e. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <em>offs_type<\/em> \u0432\u043e\u043e\u0431\u0449\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430, \u0438 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if(get_cur_state() -> state_type() == qdGameObjectState::STATE_WALK){   offs += static_cast&lt;qdGameObjectStateWalk*>(     get_cur_state()) -> center_offset(direction_angle_, GetOffsetType()); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440: \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0434\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u043e \u043d\u0430\u0441 \u043a \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0443 \u043a\u043e\u0434\u0430, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043e\u043d \u0441\u0442\u0430\u043b \u043f\u0440\u043e\u0449\u0435 \u0438 \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u044b\u043b\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e:<\/p>\n<p>  <\/p>\n<ol>\n<li>\u041a\u0430\u043a \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043a\u043d\u043e\u043f\u043a\u0430 <strong>Best<\/strong> \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c PVS-Studio. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e, \u043d\u0435 \u043e\u0442\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044f, <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/try-free\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1119\">\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0440\u0438\u0430\u043b<\/a> \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b.<\/li>\n<li>\u041a\u0430\u043a\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 PVS-Studio \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0438 \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u0442\u044c \u0435\u0449\u0451 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u0427\u0435\u043c \u0440\u0430\u043d\u044c\u0448\u0435 \u043e\u0448\u0438\u0431\u043a\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0442\u0435\u043c \u043f\u0440\u043e\u0449\u0435 \u0438 \u0434\u0435\u0448\u0435\u0432\u043b\u0435 \u0435\u0451 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.<\/li>\n<li>\u041a\u0430\u043a \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u044e\u0442 \u043a \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u043a\u043e\u0434\u0430 (\u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0443).<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u043e qdEngine \u044f \u0440\u0430\u0437\u0431\u0435\u0440\u0443 \u0435\u0449\u0451 \u0440\u044f\u0434 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"dopolnitelnye-ssylki\">\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h2>\n<p>  <\/p>\n<ol>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0873\/\">\u0420\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0421++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u043e\u0432: \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043a\u043e\u0434\u0430<\/a>.<\/li>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0968\/\">\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u0434<\/a>.<\/li>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1115\/\">\u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u0434\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0438\u0441\u0442\u044b\u0439 \u043a\u043e\u0434<\/a>.<\/li>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0891\/\">\u0412\u044b\u0437\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430\u0445 (C++)<\/a>.<\/li>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/0743\/\">\u041a\u0430\u043a \u0432\u043d\u0435\u0434\u0440\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430 \u0432 legacy \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043d\u0435 \u0434\u0435\u043c\u043e\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443<\/a>.<\/li>\n<\/ol>\n<p>  <\/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: Andrey Karpov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1119\/\">Let&#8217;s check the qdEngine game engine, part one: top 10 warnings issued by PVS-Studio<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/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\/articles\/810987\/\"> https:\/\/habr.com\/ru\/articles\/810987\/<\/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 article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yy\/es\/bm\/yyesbmkf7yiey1y48dn04tu1yxg.png\" alt=\"\u0411\u0440\u0430\u0442\u044c\u044f \u041f\u0438\u043b\u043e\u0442\u044b, qdEngine, PVS-Studio\" data-src=\"https:\/\/habrastorage.org\/webt\/yy\/es\/bm\/yyesbmkf7yiey1y48dn04tu1yxg.png\"\/><br \/>  \u0411\u0430\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u0434\u0432\u0438\u0436\u043a\u0435 qdEngine, \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043c\u0435\u0448\u0430\u0442\u044c \u0432\u0441\u0451 \u0432 \u043a\u0443\u0447\u0443 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0435 \u0442\u0435\u043c\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0437\u0431\u043e\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432\u044b\u0439\u0434\u0435\u0442 \u0432 \u0432\u0438\u0434\u0435 \u0441\u0435\u0440\u0438\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043f\u0435\u0440\u0432\u0430\u044f \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u0432\u044f\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f\u043c \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 PVS-Studio.<\/p>\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-374916","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/374916","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=374916"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/374916\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=374916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=374916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}