Skip to content

Commit

Permalink
Fix compile errors with Clang 10.0.0 (#4937)
Browse files Browse the repository at this point in the history
* Fix compile errors with Clang 10.0.0

Right now the code does not compile with Clang 10.0.0
These changes should make them work on MSVC and Clang

Built on a local repository using BUCK with Clang

* Change files
  • Loading branch information
christophpurrer authored and NickGerleman committed May 19, 2020
1 parent 8a65e83 commit 08ec22c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "none",
"comment": "Fix compile errors with Clang 10.0.0",
"packageName": "react-native-windows",
"email": "christophpurrer@gmail.com",
"dependentChangeType": "none",
"date": "2020-05-18T09:05:00.527Z"
}
2 changes: 1 addition & 1 deletion vnext/Microsoft.ReactNative.Cxx/JSValue.h
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ inline T JSValue::To(T &&defaultValue) const noexcept {
}

template <class T>
static JSValue JSValue::From(T const &value) noexcept {
JSValue JSValue::From(T const &value) noexcept {
auto writer = MakeJSValueTreeWriter();
WriteValue(writer, value);
return TakeJSValue(writer);
Expand Down
2 changes: 1 addition & 1 deletion vnext/ReactUWP/Utils/ValueUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ REACTWINDOWS_API_(bool) IsValidColorValue(const folly::dynamic &d) {

REACTWINDOWS_API_(winrt::TimeSpan) TimeSpanFromMs(double ms) {
std::chrono::milliseconds dur((int64_t)ms);
return winrt::TimeSpan(dur);
return winrt::TimeSpan::duration(dur);
}

} // namespace uwp
Expand Down

0 comments on commit 08ec22c

Please sign in to comment.