MCPcopy Create free account
hub / github.com/BombusMod/BombusMod / addSmile

Method addSmile

src/main/java/Messages/MessageParser.java:95–110  ·  view source on GitHub ↗
(Leaf rootSmile, String smile, int index)

Source from the content-addressed store, hash-verified

93 }
94
95 private void addSmile(Leaf rootSmile, String smile, int index) {
96 Leaf p=rootSmile;
97 Leaf p1;
98
99 int len=smile.length();
100 for (int i=0; i<len; i++) {
101 char c=smile.charAt(i);
102 p1=p.findChild(c);
103 if (p1==null) {
104 p1=new Leaf();
105 p.addChild((char)c,p1);
106 }
107 p=p1;
108 }
109 p.smile=index;
110 }
111
112 public void parseMsg(MessageItem message, int windowWidth) {
113 wordsWrap = (1 == Config.getInstance().textWrap);

Callers 1

MessageParserMethod · 0.95

Calls 2

findChildMethod · 0.95
addChildMethod · 0.95

Tested by

no test coverage detected