Commits

Darrell Schiebel authored 309c5dcac83 Merge
Merge remote-tracking branch 'origin/CAS-14106' into CAS-14150

Pick up fixes for casacore update from CAS-14106 Bump casa-source reference for CAS-14150

src/code/display/Display/AttBufferTemplates.tcc

Modified
20 20 //# Internet email: aips2-request@nrao.edu.
21 21 //# Postal address: AIPS++ Project Office
22 22 //# National Radio Astronomy Observatory
23 23 //# 520 Edgemont Road
24 24 //# Charlottesville, VA 22903-2475 USA
25 25 //#
26 26 //# $Id$
27 27
28 28 #include <casa/Exceptions/Error.h>
29 29 #include <casa/Arrays/Vector.h>
30 -#include <casa/Utilities/DataType.h>
30 +
31 31 #include <display/Display/Attribute.h>
32 32 #include <display/Display/AttVal.h>
33 33 #include <display/Display/AttributeBuffer.h>
34 34
35 35 namespace casa { //# NAMESPACE CASA - BEGIN
36 36
37 37 template <class T>
38 38 casacore::Bool AttributeBuffer::getValue(const casacore::String &name, T &value) const {
39 39 casacore::Vector<T> tmp;
40 40 if (getValue(name, tmp)) {
41 41 value = tmp(0);
42 42 return true;
43 43 } else {
44 44 return false;
45 45 }
46 46 }
47 47
48 48 template <class T>
49 49 casacore::Bool AttributeBuffer::getValue(const casacore::String &name, casacore::Vector<T> &value) const {
50 - casacore::Vector<T>* tmp = NULL;
51 - casacore::DataType dtype = whatType(tmp);
50 + //casacore::Vector<T> tmp;
51 + casacore::DataType value_type = casacore::whatType<T>();
52 + casacore::DataType dtype = asArray(value_type);
52 53 /*AttValue::ValueType valType;
53 54 switch(dtype) {
54 55 case TpArrayUInt:
55 56 valType = AttValue::AtuInt;
56 57 break;
57 58 case TpArrayInt:
58 59 valType = AttValue::AtInt;
59 60 break;
60 61 case TpArrayBool:
61 62 valType = AttValue::AtBool;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut