title: error: taking address of temporary [-fpermissive] - npc_multivendor
body: <p>No matter what I do, I always get the same error message. Maybe someone has an idea what I could change.</p>
  
  <p>This is my script: </p>
  
  <pre><code>    void SendInventoryCustom(Player* player, Creature* vendor, int guid)
  {
      std::vector&lt;ItemList&gt; vendors = GetVendorList();
      ItemList myVendor;
      for(int i = 0; i &lt; vendors.size(); i++)
      {
          if(vendors[i].GetVendor().getGuid() == guid)
          {
              myVendor = ItemList(&amp;vendors[i].GetVendor(), &amp;vendors[i].GetVendor().items);
              break;
          }
      }
  
      SmsgListInventory inventory_packet(vendor-&gt;GetGUID(), player-&gt;GetSession(), &amp;myVendor.GetVendor().items, vendors);
      inventory_packet.Send(vendor, player);
  }
  </code></pre>
  
  <p>During compilation I get the following error message:</p>
  
  <pre><code>1266:59: error: taking address of temporary [-fpermissive]
  </code></pre>
  
  <p>Line 1266 starts with:</p>
  
  <pre><code>myVendor = ItemList(&amp;vendors[i].GetVendor(), &amp;vendors[i].GetVendor().items);
  </code></pre>
  
  <p>And this ist the Full Script:<br>
  <a href="http://pastebin.com/DNnyjEeT" rel="noreferrer">http://pastebin.com/DNnyjEeT</a></p>
  
  <p>I would be very grateful if someone could help me with my problem.<br>
  Thanks in advance, Best regards!</p>