Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
MSVC does not like: sizeof(T[N])

Change-Id: If7586a0d29f609372e036fdb31481e923469a7ad
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/26349
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
  • Loading branch information
ben-clayton committed Mar 7, 2019
1 parent 2995dc2 commit 952d273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Pipeline/SpirvShader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace sw

Intermediate(uint32_t size) : contents(new ContentsType[size]), size(size) {
#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
memset(contents, 0, sizeof(ContentsType[size]));
memset(contents, 0, sizeof(ContentsType) * size);
#endif
}

Expand Down

0 comments on commit 952d273

Please sign in to comment.