title: How can I pass both `int` and `unsigned int` members, by reference or pointer, to the same function?
body: <p>I have a 20-30 line C++ function which was taking a reference to an <code>int</code> for possible updation. Now I am replacing the member which was passed to it with a member of a member encapsulating more data, something like:</p>
  
  <pre><code>searchState.matchedOK = specificSearch(*pageIndices.GetStringIByRef(), searchState); //new, and overwritten.
  searchState.matchedOK = specificSearch(pageOffsetInText, searchState); //old
  </code></pre>
  
  <p>I want to localise this modification to the lines and function called above because the old member should be removed once I have verified equivalence and beyond.</p>
  
  <p>Is this possible with simple casts?</p>
  
  <p>If you want code:</p>
  
  <pre><code>static bool specificSearch(int &amp;matchLocation, const SearchSpecs &amp;specs) {/**/}
  </code></pre>
  
  <p>and the recently added member:</p>
  
  <pre><code>inline unsigned int *GetStringIByRef() {return &amp;stringI;}
  </code></pre>