Chromium Code Reviews| Index: net/disk_cache/blockfile/addr.h |
| diff --git a/net/disk_cache/blockfile/addr.h b/net/disk_cache/blockfile/addr.h |
| index f21fbf2aa14000ccdd6f978a976ed238b4bc3099..e55499caa48e42fc9b6ebd727fd2449f6ca6f020 100644 |
| --- a/net/disk_cache/blockfile/addr.h |
| +++ b/net/disk_cache/blockfile/addr.h |
| @@ -11,6 +11,7 @@ |
| #include <stddef.h> |
| #include <stdint.h> |
| +#include "base/logging.h" |
| #include "net/base/net_export.h" |
| #include "net/disk_cache/blockfile/disk_format_base.h" |
| @@ -138,7 +139,8 @@ class NET_EXPORT_PRIVATE Addr { |
| return 104; |
| case BLOCK_EVICTED: |
| return 48; |
| - default: |
| + case EXTERNAL: |
| + NOTREACHED(); |
|
Zhongyi Shi
2016/10/27 23:29:43
nit: I would prefer to have the default case but w
hans
2016/10/27 23:33:35
But then you won't get any compiler warning if ano
Zhongyi Shi
2016/10/28 00:01:49
What I am proposing is
case BLOCK_EVICTED:
retu
hans
2016/10/28 00:57:35
Yes, every enum needs to be handled in the switch,
Zhongyi Shi
2016/10/28 02:26:49
Alright, your argument sold, I agreed that this co
|
| return 0; |
| } |
| } |