diff --git a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h
index 9cddfed3e87f5c54f3b0c077cd55762c95e87697..9478d2ab3be0dd7fc4ee4b47e5d147f139741c96 100644
--- a/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h
+++ b/Framework/CurveFitting/inc/MantidCurveFitting/CostFunctions/CostFuncLeastSquares.h
@@ -102,8 +102,8 @@ protected:
   mutable double m_pushedValue;
   mutable GSLVector m_pushedParams;
 
-  friend class SeqDomain;
-  friend class ParDomain;
+  friend class CurveFitting::SeqDomain;
+  friend class CurveFitting::ParDomain;
 
   double m_factor;
 };