Examples of errors detected by the V766 diagnostic.

V766. An item with the same key has already been added.


V766 An item with the same key '"colorSectionBorder"' has already been added. ntp_resource_cache.cc 581

void NTPResourceCache::CreateNewTabCSS()
  // Colors.
  substitutions["colorBackground"] =
  substitutions["backgroundBarDetached"] =
    GetNewTabBackgroundCSS(tp, false);
  substitutions["backgroundBarAttached"] =
    GetNewTabBackgroundCSS(tp, true);
  substitutions["backgroundTiling"] =
  substitutions["colorTextRgba"] =
  substitutions["colorSectionBorder"] =
      SkColorToRGBAString(color_section_border); // <=
  substitutions["colorTextLight"] =
  substitutions["colorSectionBorder"] =
      SkColorToRGBComponents(color_section_border); // <=
  substitutions["colorText"] =


V766 An item with the same key '"mrcs"' has already been added. importgtp-gp6.cpp 100

const static std::map<QString, QString> instrumentMapping = {
  {"e-piano-gs", "electric-piano"},
  {"e-piano-ss", "electric-piano"},
  {"hrpch-gs", "harpsichord"},
  {"hrpch-ss", "harpsichord"},
  {"mrcs", "maracas"},                // <=
  {"mrcs", "oboe"},                   // <=
  {"mrcs", "oboe"},                   // <= using of Copy-Paste

Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++, and C#

goto PVS-Studio;
We use cookies for the analysis of events to improve our content and make user interaction more convenient. By continuing the view of our web-pages you accept the terms of using these files. You can find out more about cookie-files and privacy policy or close the notification, by clicking on the button. Learn More →
Do not show