title: Narrowing conversion required while using a P-RNG
body: <p>I am trying to get a random number between a minimum value and a maximum value, but i get a narrowing conversion error. I have checked the template parameters of uniform_int_distribution so using a short shouldnt be an issue.</p>
  <blockquote>
  <p><strong>Template parameters</strong><br />
  IntType -   The result type generated by the generator. The effect is undefined if this is not one of <em>short</em>, <em>int</em>, <em>long</em>, <em>long long</em>, <em>unsigned short</em>, <em>unsigned int</em>, <em>unsigned long</em>, or <em>unsigned long long</em>.</p>
  </blockquote>
  <p>In my attempt to fix the issue i casted the values to a short which did not seem to fix it.
  When 2 integer values have been attributed to randX and randY the error disappeared.</p>
  <p>My current code after reverting the changes that have been made to it:</p>
  <pre class="lang-cpp prettyprint-override"><code>Fruit Fruit::getRandomFruit(const short&amp; maxPosX, const short&amp; maxPosY)
  {
      bool isEaten{0};
      std::uniform_int_distribution&lt;short&gt; randX{ 1, maxPosX-1 };
      std::uniform_int_distribution&lt;short&gt; randY{ 1, maxPosY-1 };
  
      COORD frPos{randX(mersenne), randY(mersenne)};
  
      return {isEaten,
              frPos
      };
  }
  </code></pre>
  <p>Error message:</p>
  <pre><code>Element '2': conversion from 'int' to '_Ty' requires a narrowing conversion
  </code></pre>
  <p>From my understanding the compiler sees the values as being integers and it's attempting to convert them.</p>