Skip to content

Commit f188dc5

Browse files
committed
Merge pull request #150 from johnhaddon/lookupImprovement
Fixed IECore::Lookup for OS X.
2 parents ef8026f + e3121ad commit f188dc5

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

include/IECore/Lookup.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
33
// Copyright (c) 2009, Image Engine Design Inc. All rights reserved.
4+
// Copyright (c) 2013, John Haddon. All rights reserved.
45
//
56
// Redistribution and use in source and binary forms, with or without
67
// modification, are permitted provided that the following conditions are
@@ -35,10 +36,12 @@
3536
#ifndef IECORE_LOOKUP_H
3637
#define IECORE_LOOKUP_H
3738

38-
#include "OpenEXR/ImathColor.h"
39-
4039
#include <vector>
4140

41+
#include "boost/function.hpp"
42+
43+
#include "OpenEXR/ImathColor.h"
44+
4245
namespace IECore
4346
{
4447

@@ -54,13 +57,11 @@ class Lookup
5457

5558
typedef X XType;
5659
typedef Y YType;
60+
typedef boost::function<Y ( X )> Function;
5761

5862
Lookup();
59-
60-
template<class Function>
6163
Lookup( const Function &function, XType xMin, XType xMax, unsigned numSamples );
6264

63-
template<class Function>
6465
void init( const Function &function, XType xMin, XType xMax, unsigned numSamples );
6566

6667
inline Y operator() ( X x ) const;

include/IECore/Lookup.inl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
33
// Copyright (c) 2009, Image Engine Design Inc. All rights reserved.
4+
// Copyright (c) 2013, John Haddon. All rights reserved.
45
//
56
// Redistribution and use in source and binary forms, with or without
67
// modification, are permitted provided that the following conditions are
@@ -51,14 +52,12 @@ Lookup<X, Y>::Lookup()
5152
}
5253

5354
template<typename X, typename Y>
54-
template<class Function>
5555
Lookup<X, Y>::Lookup( const Function &function, XType xMin, XType xMax, unsigned numSamples )
5656
{
5757
init( function, xMin, xMax, numSamples );
5858
}
5959

6060
template<typename X, typename Y>
61-
template<class Function>
6261
void Lookup<X, Y>::init( const Function &function, XType xMin, XType xMax, unsigned numSamples )
6362
{
6463
m_values.resize( numSamples );

0 commit comments

Comments
 (0)