| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkOTTable_name.h" | 8 #include "SkOTTable_name.h" |
| 9 | 9 |
| 10 #include "SkEndian.h" | 10 #include "SkEndian.h" |
| (...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 // Handle format 0 languages, translating them into BCP 47. | 522 // Handle format 0 languages, translating them into BCP 47. |
| 523 const BCP47FromLanguageId target = { languageID, "" }; | 523 const BCP47FromLanguageId target = { languageID, "" }; |
| 524 int languageIndex = SkTSearch<BCP47FromLanguageId, BCP47FromLanguageIdLess>( | 524 int languageIndex = SkTSearch<BCP47FromLanguageId, BCP47FromLanguageIdLess>( |
| 525 BCP47FromLanguageID, SK_ARRAY_COUNT(BCP47FromLanguageID), target, sizeof
(target)); | 525 BCP47FromLanguageID, SK_ARRAY_COUNT(BCP47FromLanguageID), target, sizeof
(target)); |
| 526 if (languageIndex >= 0) { | 526 if (languageIndex >= 0) { |
| 527 record.language = BCP47FromLanguageID[languageIndex].bcp47; | 527 record.language = BCP47FromLanguageID[languageIndex].bcp47; |
| 528 return true; | 528 return true; |
| 529 } | 529 } |
| 530 | 530 |
| 531 // Unknown language, return the BCP 47 code 'und' for 'undetermined'. | 531 // Unknown language, return the BCP 47 code 'und' for 'undetermined'. |
| 532 SkASSERT(false); | |
| 533 record.language = "und"; | 532 record.language = "und"; |
| 534 return true; | 533 return true; |
| 535 } | 534 } |
| OLD | NEW |