| 102 | |
| 103 | template <typename T> |
| 104 | T PlyRead(ifstream& s, PlyFormat format) |
| 105 | { |
| 106 | T data = eAscii; |
| 107 | |
| 108 | switch (format) |
| 109 | { |
| 110 | case eAscii: |
| 111 | { |
| 112 | s >> data; |
| 113 | break; |
| 114 | } |
| 115 | case eBinaryBigEndian: |
| 116 | { |
| 117 | char c[sizeof(T)]; |
| 118 | s.read(c, sizeof(T)); |
| 119 | reverse(c, c+sizeof(T)); |
| 120 | data = *(T*)c; |
| 121 | break; |
| 122 | } |
| 123 | default: |
| 124 | assert(0); |
| 125 | } |
| 126 | |
| 127 | return data; |
| 128 | } |
| 129 | |
| 130 | } // namespace anonymous |
| 131 |
nothing calls this directly
no outgoing calls
no test coverage detected