Skip to content

Commit

Permalink
switch private to protected
Browse files Browse the repository at this point in the history
Summary: Allow subclasses to access previously private member variables of subclass.

Differential Revision: D6335909

fbshipit-source-id: 5b6ee557947cba939e1c81388261440a22f2afd5
  • Loading branch information
cpuhrsch authored and facebook-github-bot committed Nov 15, 2017
1 parent 6dfd5dd commit abb7b60
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/args.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ enum class model_name : int {cbow=1, sg, sup};
enum class loss_name : int {hs=1, ns, softmax};

class Args {
private:
protected:
std::string lossToString(loss_name);

public:
Expand Down
2 changes: 1 addition & 1 deletion src/dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct entry {
};

class Dictionary {
private:
protected:
static const int32_t MAX_VOCAB_SIZE = 30000000;
static const int32_t MAX_LINE_SIZE = 1024;

Expand Down
2 changes: 1 addition & 1 deletion src/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct Node {
};

class Model {
private:
protected:
std::shared_ptr<Matrix> wi_;
std::shared_ptr<Matrix> wo_;
std::shared_ptr<QMatrix> qwi_;
Expand Down
2 changes: 1 addition & 1 deletion src/productquantizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace fasttext {

class ProductQuantizer {
private:
protected:
const int32_t nbits_ = 8;
const int32_t ksub_ = 1 << nbits_;
const int32_t max_points_per_cluster_ = 256;
Expand Down
2 changes: 1 addition & 1 deletion src/qmatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace fasttext {

class QMatrix {
private:
protected:
std::unique_ptr<ProductQuantizer> pq_;
std::unique_ptr<ProductQuantizer> npq_;

Expand Down

0 comments on commit abb7b60

Please sign in to comment.