File tree 3 files changed +6
-7
lines changed
3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ type nefHeader struct {
54
54
// NEF-specific information: http://lclevy.free.fr/nef/
55
55
// TIFF specification: http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf
56
56
type NefParser struct {
57
- // HostIsLittleEndian bool
58
57
* rawParser
59
58
}
60
59
Original file line number Diff line number Diff line change @@ -114,24 +114,24 @@ func (r rawParser) IsHostLittleEndian() bool {
114
114
// lower-case file extension of the raw file type;
115
115
// the value is the pointer to the RawParser implementation.
116
116
type RawParsers struct {
117
- parserMap map [string ]RawParser
117
+ parserMap map [string ]* RawParser
118
118
}
119
119
120
120
// NewRawParsers creates an instance of RawParsers.
121
121
func NewRawParsers () * RawParsers {
122
122
p := new (RawParsers )
123
- p .parserMap = make (map [string ]RawParser )
123
+ p .parserMap = make (map [string ]* RawParser )
124
124
return p
125
125
}
126
126
127
127
// Register maps the implementation of the RawParser
128
128
// interface to the key.
129
- func (p * RawParsers ) Register (key string , parser RawParser ) {
129
+ func (p * RawParsers ) Register (key string , parser * RawParser ) {
130
130
p .parserMap [key ] = parser
131
131
}
132
132
133
133
// GetParser returns a RawParser for a given raw file type or nil if not found.
134
- func (p RawParsers ) GetParser (key string ) RawParser {
134
+ func (p RawParsers ) GetParser (key string ) * RawParser {
135
135
return p .parserMap [key ]
136
136
}
137
137
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ func TestRawParsers(t *testing.T) {
57
57
if nefparser == nil || key != NefParserKey {
58
58
t .Fail ()
59
59
}
60
- rp .Register (NefParserKey , nefparser )
60
+ rp .Register (NefParserKey , & nefparser )
61
61
62
62
// delete parser
63
63
rp .DeleteParser (NefParserKey )
@@ -67,7 +67,7 @@ func TestRawParsers(t *testing.T) {
67
67
if cr2parser == nil || key != Cr2ParserKey {
68
68
t .Fail ()
69
69
}
70
- rp .Register (Cr2ParserKey , cr2parser )
70
+ rp .Register (Cr2ParserKey , & cr2parser )
71
71
72
72
// delete parser
73
73
rp .DeleteParser (Cr2ParserKey )
You can’t perform that action at this time.
0 commit comments