OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "courgette/disassembler.h" | 5 #include "courgette/disassembler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 failure_reason_ = NULL; | 118 failure_reason_ = NULL; |
119 return true; | 119 return true; |
120 } | 120 } |
121 | 121 |
122 bool Disassembler::Bad(const char* reason) { | 122 bool Disassembler::Bad(const char* reason) { |
123 failure_reason_ = reason; | 123 failure_reason_ = reason; |
124 return false; | 124 return false; |
125 } | 125 } |
126 | 126 |
127 void Disassembler::ReduceLength(size_t reduced_length) { | 127 void Disassembler::ReduceLength(size_t reduced_length) { |
128 if (reduced_length < length_) | 128 if (reduced_length < length_) { |
rickyz (no longer on Chrome)
2015/03/23 23:14:50
Can this just be a CHECK instead?
halyavin2
2015/03/24 14:35:17
Done.
| |
129 length_ = reduced_length; | 129 length_ = reduced_length; |
130 end_ = start_ + length_; | |
131 } | |
130 } | 132 } |
131 | 133 |
132 } // namespace courgette | 134 } // namespace courgette |
OLD | NEW |