#include "sourcefile.h"
#include "sourcepackage.h"
-SourceFile::SourceFile(Builder &b, const Component *c, const Msp::FS::Path &p):
- FileTarget(b, (c ? &c->get_package() : 0), p),
- comp(c)
+SourceFile::SourceFile(Builder &b, const Msp::FS::Path &p):
+ FileTarget(b, p)
{ }
+
+SourceFile::SourceFile(Builder &b, const Component &c, const Msp::FS::Path &p):
+ FileTarget(b, c.get_package(), p)
+{
+ component = &c;
+}