Jamie Madill | 5704d6e | 2014-08-26 13:16:38 -0400 | [diff] [blame] | 1 | // |
| 2 | // Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. |
| 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
| 6 | |
| 7 | #ifndef UTIL_SHARED_UTILS_H |
| 8 | #define UTIL_SHARED_UTILS_H |
| 9 | |
| 10 | #define SHADER_SOURCE(...) #__VA_ARGS__ |
| 11 | |
| 12 | // A macro to disallow the copy constructor and operator= functions |
| 13 | // This must be used in the private: declarations for a class |
| 14 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
| 15 | TypeName(const TypeName&); \ |
| 16 | void operator=(const TypeName&) |
| 17 | |
Jamie Madill | 33ea2f9 | 2014-08-29 15:15:01 -0400 | [diff] [blame] | 18 | template <typename T, size_t N> |
| 19 | inline size_t ArraySize(T(&)[N]) |
| 20 | { |
| 21 | return N; |
| 22 | } |
| 23 | |
Jamie Madill | 5704d6e | 2014-08-26 13:16:38 -0400 | [diff] [blame] | 24 | #endif // UTIL_SHARED_UTILS_H |