| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> | 2 * Copyright 2005 Frerich Raabe <raabe@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 VariableReference::VariableReference(const String& name) : m_name(name) {} | 34 VariableReference::VariableReference(const String& name) : m_name(name) {} |
| 35 | 35 |
| 36 Value VariableReference::evaluate(EvaluationContext& context) const { | 36 Value VariableReference::evaluate(EvaluationContext& context) const { |
| 37 HashMap<String, String>& bindings = context.variableBindings; | 37 HashMap<String, String>& bindings = context.variableBindings; |
| 38 if (!bindings.contains(m_name)) { | 38 if (!bindings.contains(m_name)) { |
| 39 // FIXME: Is this the right thing to do if an unknown variable is | 39 // FIXME: Is this the right thing to do if an unknown variable is |
| 40 // referenced? | 40 // referenced? |
| 41 return ""; | 41 return ""; |
| 42 } | 42 } |
| 43 return bindings.get(m_name); | 43 return bindings.at(m_name); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace XPath | 46 } // namespace XPath |
| 47 } // namespace blink | 47 } // namespace blink |
| OLD | NEW |