• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2015 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 
find_sk(CType from,SKType * to)8 static bool find_sk(CType from, SKType* to) {
9     for (size_t i = 0; i < SK_ARRAY_COUNT(CTypeSkTypeMap); ++i) {
10         if (CTypeSkTypeMap[i].fC == from) {
11             if (to) {
12                 *to = CTypeSkTypeMap[i].fSK;
13             }
14             return true;
15         }
16     }
17     return false;
18 }
19 
find_c(SKType from,CType * to)20 static bool find_c(SKType from, CType* to) {
21     for (size_t i = 0; i < SK_ARRAY_COUNT(CTypeSkTypeMap); ++i) {
22         if (CTypeSkTypeMap[i].fSK == from) {
23             if (to) {
24                 *to = CTypeSkTypeMap[i].fC;
25             }
26             return true;
27         }
28     }
29     return false;
30 }
31 
32 #undef CType
33 #undef SKType
34 #undef CTypeSkTypeMap
35