aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4scopedvalue_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-01-25 21:41:31 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-31 11:13:48 +0100
commitd06cfd6126a23774ba4efe971ed5c8c148822889 (patch)
tree23aba719ad0f6741ad25996cac4af033d3b25202 /src/qml/jsruntime/qv4scopedvalue_p.h
parenta78a48c5328ea746dfd161599894a4a5b11041bd (diff)
Move Encode into qv4value_p.h
This is where the class logically belongs. Change-Id: I366013aad2c9b6324ae82ab5f3250f1d9c719da4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4scopedvalue_p.h')
-rw-r--r--src/qml/jsruntime/qv4scopedvalue_p.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h
index 902f1f160a..4338d672f7 100644
--- a/src/qml/jsruntime/qv4scopedvalue_p.h
+++ b/src/qml/jsruntime/qv4scopedvalue_p.h
@@ -580,51 +580,6 @@ private:
CallData *ptr;
};
-struct Encode {
- static ReturnedValue undefined() {
- return quint64(Value::Undefined_Type) << Value::Tag_Shift;
- }
- static ReturnedValue null() {
- return quint64(Value::_Null_Type) << Value::Tag_Shift;
- }
-
- Encode(bool b) {
- val = (quint64(Value::_Boolean_Type) << Value::Tag_Shift) | (uint)b;
- }
- Encode(double d) {
- Value v;
- v.setDouble(d);
- val = v.val;
- }
- Encode(int i) {
- val = (quint64(Value::_Integer_Type) << Value::Tag_Shift) | (uint)i;
- }
- Encode(uint i) {
- if (i <= INT_MAX) {
- val = (quint64(Value::_Integer_Type) << Value::Tag_Shift) | i;
- } else {
- Value v;
- v.setDouble(i);
- val = v.val;
- }
- }
- Encode(ReturnedValue v) {
- val = v;
- }
-
- template<typename T>
- Encode(Returned<T> *t) {
- val = t->getPointer()->asReturnedValue();
- }
-
- operator ReturnedValue() const {
- return val;
- }
- quint64 val;
-private:
- Encode(void *);
-};
-
template <typename T>
inline Value &Value::operator=(Returned<T> *t)