Commit Graph

7 Commits (0b317ee0f5c97bb41561fb0186ab5e8e7c76af79)

Author SHA1 Message Date
Chris Burel 3d0a15f009 Remove `AZStd::to_string(string&, bool)` overload from MCore's StringConversion header
This overload has significant impact on overload resolution. Consider these
overloads:

```cpp
void to_string(AZStd::string& dest, AZStd::wstring_view src);
void to_string(string& str, bool value);
```

And then calling code like this:
```
WCHAR src[260];
AZStd::string dst;
AZStd::to_string(dst, src); // Which overload does this call?
```

If the .cpp has not included `MCore/Source/StringConversions.h`, the call
to `to_string()` will convert the `WCHAR[260]` type to a
`AZStd::wstring_view`, and call the first overload. But if
`StringConversions.h` _has_ been included, the implicit conversion of
`WCHAR[260]` to `bool` has a higher precedence, and it will be chosen
instead.

This overload was causing some uses of `to_string` in
`AnimGraph/GameController.cpp` to resolve to the wrong overload in unity
builds.

Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Esteban Papp 62a0041245 enable warning 4296: 'operator': expression is always false
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Chris Burel 404ab51439 uint32 -> size_t
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
Steve Pham 38261d0800
Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Steve Pham b4a2edec6a
Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
alexpete a10351f38d Initial commit 5 years ago