Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "blimp/net/helium/helium_result.h" | |
| 6 | |
| 7 namespace blimp { | |
| 8 | |
| 9 const char* HeliumResultToString(HeliumResult result) { | |
| 10 switch (result) { | |
| 11 case HeliumResult::OK: | |
| 12 return "OK"; | |
| 13 break; | |
| 14 #define HELIUM_ERROR(label, value) \ | |
| 15 case HeliumResult::ERR_##label: \ | |
| 16 return "ERR_" #label; | |
| 17 break; | |
| 18 #include "blimp/net/helium/helium_errors.h" | |
|
CJ
2016/10/03 20:47:33
Just for my own knowledge, why does the include co
Kevin M
2016/10/03 22:32:19
This is an unconventional use of preprocessor incl
CJ
2016/10/03 22:36:31
I get that a switch statement is being created, I
| |
| 19 #undef HELIUM_ERROR | |
| 20 } | |
| 21 } | |
| 22 | |
| 23 } // namespace blimp | |
| 24 | |
| OLD | NEW |