Skip to content

Commit f332196

Browse files
authored
Use const char * for static insline string const in llava_runner.h (#12840)
With std::string, its constructor is part of dynamic initialization and across TUs the order is undefined, so code in another static initializer might see it before it’s constructed
1 parent 21c8e67 commit f332196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/models/llava/runner/llava_runner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ET_EXPERIMENTAL LlavaRunner
6363
bool echo = true) override;
6464

6565
private:
66-
inline static const std::string kPresetPrompt =
66+
inline static const char* kPresetPrompt =
6767
"A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. USER: ";
6868
};
6969

0 commit comments

Comments
 (0)